From c1e2f351f8c27f8f3b9c8deb2d05eb10fec18c9c Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 25 Jun 2002 03:32:31 +0000 Subject: Add more info on regex's using INDEX. --- doc/FAQ | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'doc/FAQ') diff --git a/doc/FAQ b/doc/FAQ index 0cc05b3d3b7..9c2f01a3e53 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -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? -- cgit v1.2.3