Commit bb18b473 authored by Bruce Momjian's avatar Bruce Momjian

Document partial indexes for IS NULL lookups.

parent 2f2a3439
<!-- <!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.45 2004/04/20 01:00:26 momjian Exp $ $PostgreSQL: pgsql/doc/src/sgml/ref/create_index.sgml,v 1.46 2004/04/20 04:25:47 momjian Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -77,11 +77,9 @@ CREATE [ UNIQUE ] INDEX <replaceable class="parameter">name</replaceable> ON <re ...@@ -77,11 +77,9 @@ CREATE [ UNIQUE ] INDEX <replaceable class="parameter">name</replaceable> ON <re
</para> </para>
<para> <para>
<literal>NULL</> values are not indexed by default. The best way Indexes can not be used with <literal>IS NULL</> clauses by default.
to index <literal>NULL</> values is to create a partial index using The best way to use indexes in such cases is to create a partial index
an <literal>IS NULL</> comparison. <literal>IS NULL</> is more using an <literal>IS NULL</> comparison.
of a function call than a value comparison, and this is why a partial
index works.
</para> </para>
<para> <para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment