Re: Functional Index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Functional Index
Дата
Msg-id 1294.1164212673@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Functional Index  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Ответы Re: Functional Index  (Bernhard Weisshuhn <bkw@weisshuhn.de>)
Список pgsql-general
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> On Wed, 22 Nov 2006, Alexander Presber wrote:
>> CREATE INDEX idx_main_subject ON pdb.main (lower(main_subject::text)
>> using varchar_ops);

> IIRC, unless you're in C locale, you'll want varchar_pattern_ops rather
> than varchar_ops on the index to make it considered for a LIKE search.

text_pattern_ops would be better, seeing that the output of lower() is
text not varchar.  I'm a bit surprised the planner is able to make use
of this index at all.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: MSSQL to PostgreSQL : Encoding problem
Следующее
От: Tony Caduto
Дата:
Сообщение: Re: Data transfer between databases over the Internet