Skip site navigation (1) Skip section navigation (2)

Re: match_special_index_operator don't work in 7.2.1

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Andriy I Pilipenko <bamby(at)marka(dot)net(dot)ua>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: match_special_index_operator don't work in 7.2.1
Date: 2002-05-19 11:07:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Sun, 19 May 2002, Andriy I Pilipenko wrote:

> Please enter a FULL description of your problem:
> ------------------------------------------------
> I've upgraded from 7.0.3 to 7.2.1 and noticed that queries like
> SELECT ... WHERE field LIKE 'something%'
> take too much time to execute now.

Are you sure that you're running in C locale?  If you're unsure,
you can build pg_controldata in contrib and check.

(From comments in recent sources:
 * We want test whether the database's LC_COLLATE setting is safe for
 * LIKE/regexp index optimization.
 * The key requirement here is that given a prefix string, say "foo",
 * we must be able to generate another string "fop" that is greater
 * than all strings "foobar" starting with "foo".  Unfortunately, a
 * non-C locale may have arbitrary collation rules in which "fop" >
 * "foo" is not sufficient to ensure "fop" > "foobar".  Until we can
 * come up with a more bulletproof way of generating the upper-bound
 * string, the optimization is disabled in all non-C locales.
 * (In theory, locales other than C may be LIKE-safe so this function
 * could be different from lc_collate_is_c(), but in a different
 * theory, non-C locales are completely unpredicable so it's unlikely
 * to happen.)

In response to


pgsql-bugs by date

Next:From: Andriy I PilipenkoDate: 2002-05-19 11:18:12
Subject: Re: match_special_index_operator don't work in 7.2.1
Previous:From: Andriy I PilipenkoDate: 2002-05-19 10:30:17
Subject: match_special_index_operator don't work in 7.2.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group