Re: What is the impact of "varchar_pattern_ops" on performance and/or memory (was: What is impact of "varchar_ops")?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What is the impact of "varchar_pattern_ops" on performance and/or memory (was: What is impact of "varchar_ops")?
Дата
Msg-id 25526.1358885098@sss.pgh.pa.us
обсуждение исходный текст
Ответ на What is the impact of "varchar_pattern_ops" on performance and/or memory (was: What is impact of "varchar_ops")?  (Edson Richter <edsonrichter@hotmail.com>)
Ответы Re: What is the impact of "varchar_pattern_ops" on performance and/or memory  (Edson Richter <edsonrichter@hotmail.com>)
Список pgsql-general
Edson Richter <edsonrichter@hotmail.com> writes:
> Almost all indexed columns of kind varchar in my database require
> "varchar_pattern_ops" op class in order to make my LIKE queries more
> optmized.

> Is there any way to define that this operator class is the default for
> my database for varchar columns?

No.  (Well, you could go and hack the catalog entries to mark it as the
default, but things would fail rather badly whenever you dump and reload
the database, because pg_dump won't dump changes to built-in objects.)

> What would be the impact in terms of performance and memory consumption?

It's probably cheaper, actually, than the regular strcoll-based
comparisons.

BTW, have you considered whether you could run your database in C locale
and thus dodge the whole problem?  In C locale there's no difference
between this opclass and text_ops.

            regards, tom lane


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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Running update in chunks?
Следующее
От: Edson Richter
Дата:
Сообщение: Re: What is the impact of "varchar_pattern_ops" on performance and/or memory