Re: PG won't use index on ORDER BY

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: PG won't use index on ORDER BY
Дата
Msg-id 87fy2s1nrd.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на PG won't use index on ORDER BY  (Andreas Joseph Krogh <andreak@officenet.no>)
Ответы Re: PG won't use index on ORDER BY  (Andreas Joseph Krogh <andreak@officenet.no>)
Список pgsql-sql
"Andreas Joseph Krogh" <andreak@officenet.no> writes:

> I create an index:
> CREATE INDEX person_lowerfullname_idx ON 
> person((lower(COALESCE(firstname, '')) || lower(COALESCE(lastname, ''))) 
> varchar_pattern_ops);

Why are you declaring it using the varchar_pattern_ops?

The default operator set is the one you want for handling ordering. The
pattern_ops operator set is for handling things like x LIKE 'foo%'

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



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

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: PG won't use index on ORDER BY
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: PG won't use index on ORDER BY