File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -814,18 +814,20 @@ SELECT *
814814FROM access_log
815815WHERE url = '/index.html' AND client_ip = inet '212.78.10.32';
816816</programlisting>
817- A query that cannot use this index is:
817+ Here the query's IP address is covered by the partial index. The
818+ following query cannot use the partial index, as it uses an IP address
819+ that is excluded from the index:
818820<programlisting>
819821SELECT *
820822FROM access_log
821- WHERE client_ip = inet '192.168.100.23';
823+ WHERE url = '/index.html' AND client_ip = inet '192.168.100.23';
822824</programlisting>
823825 </para>
824826
825827 <para>
826828 Observe that this kind of partial index requires that the common
827829 values be predetermined, so such partial indexes are best used for
828- data distributions that do not change. The indexes can be recreated
830+ data distributions that do not change. Such indexes can be recreated
829831 occasionally to adjust for new data distributions, but this adds
830832 maintenance effort.
831833 </para>
You can’t perform that action at this time.
0 commit comments