Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf052da

Browse files
committed
Doc: clarify partial-index example.
Jonathan KatzDiscussion:https://postgr.es/m/155432280882.722.12392985690846288230@wrigleys.postgresql.org
1 parentea569d6 commitaf052da

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎doc/src/sgml/indices.sgml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,18 +814,20 @@ SELECT *
814814
FROM access_log
815815
WHERE 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>
819821
SELECT *
820822
FROM access_log
821-
WHERE client_ip = inet '192.168.100.23';
823+
WHEREurl = '/index.html' ANDclient_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>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp