Re: Plan differences
От | Anton Melser |
---|---|
Тема | Re: Plan differences |
Дата | |
Msg-id | CAKywjPrWq7-Mj_NEk8U5Yrrt9O3F_qj_iSgbw1PYRZ=gZFXLwg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Plan differences (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Plan differences
|
Список | pgsql-performance |
I'd bet your old database is in C locale and the new one is not.
Remind me never to never bet against you :-).
The LIKE optimization requires an index that's sorted according to plain
C (strcmp) rules. A regular text index will be that way only if the
database's LC_COLLATE is C.
If you don't want to rebuild the whole database, you can create indexes to
support this by declaring them with COLLATE "C", or the older way is to
declare them with text_pattern_ops as the index opclass.
Thanks very much for your help.
Cheers,
Anton
В списке pgsql-performance по дате отправления: