Re: optimizing LIKE '%2345' queries

Поиск
Список
Период
Сортировка
От Mario Weilguni
Тема Re: optimizing LIKE '%2345' queries
Дата
Msg-id 200607030933.53373.mweilguni@sime.com
обсуждение исходный текст
Ответ на optimizing LIKE '%2345' queries  (Gene <genekhart@gmail.com>)
Ответы Is postgresql ca do the job for software deployed in ASP ou SaaS mode?  (David Gagnon <dgagnon@siunik.com>)
Список pgsql-performance
Am Sonntag, 2. Juli 2006 23:50 schrieb Gene:
> Is there any way to create a reverse index on string columns so that
> queries of the form:
>
> where column like '%2345';
>
> can use an index and perform as fast as searching with like '2345%'?
>
> Is the only way to create a reverse function and create an index using
> the reverse function and modify queries to use:
>
> where reverse(column) like reverse('%2345') ?
>
> thanks

create a trigger that computes this at insert/update time, index this fix, and
rewrite the query this way:
where inverted_column like '5432%';


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

Предыдущее
От: satishchandra999@gmail.com
Дата:
Сообщение: Calling a SP from Curosor loop
Следующее
От: David Gagnon
Дата:
Сообщение: Is postgresql ca do the job for software deployed in ASP ou SaaS mode?