diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-06-25 03:32:31 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-06-25 03:32:31 +0000 |
commit | c1e2f351f8c27f8f3b9c8deb2d05eb10fec18c9c (patch) | |
tree | f930f82c5800b89c44ecd212b6d0693d57104a57 /doc/FAQ | |
parent | 20241a4c5477d0443c37ccef674c15cfdda37f9e (diff) | |
download | postgresql-c1e2f351f8c27f8f3b9c8deb2d05eb10fec18c9c.tar.gz postgresql-c1e2f351f8c27f8f3b9c8deb2d05eb10fec18c9c.zip |
Add more info on regex's using INDEX.
Diffstat (limited to 'doc/FAQ')
-rw-r--r-- | doc/FAQ | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -1,7 +1,7 @@ Frequently Asked Questions (FAQ) for PostgreSQL - Last updated: Mon Jun 24 21:45:50 EDT 2002 + Last updated: Mon Jun 24 23:32:16 EDT 2002 Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) @@ -747,10 +747,20 @@ LIMIT 1 When using wild-card operators such as LIKE or ~, indexes can only be - used if the default C local is used during initdb and the beginning of - the search is anchored to the start of the string. Therefore, to use - indexes, LIKE patterns must not start with %, and ~(regular - expression) patterns must start with ^. + used in certain circumstances: + * The beginning of the search string must be anchored to the start + of the string, i.e.: + + * LIKE patterns must not start with %. + * ~(regular expression) patterns must start with ^. + + The search string can not start with a character class, e.g. [a-e]. + + Case-insensitive searches like ILIKE and ~* can not be used. + Instead, use functional indexes, which are described later in this + FAQ. + + The default C local must have been used during initdb. 4.9) How do I see how the query optimizer is evaluating my query? |