Re: Index to support LIKE '%suffix' queries

Поиск
Список
Период
Сортировка
От Florian Weimer
Тема Re: Index to support LIKE '%suffix' queries
Дата
Msg-id 874q2ik4xf.fsf@mid.deneb.enyo.de
обсуждение исходный текст
Ответ на Re: Index to support LIKE '%suffix' queries  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Index to support LIKE '%suffix' queries  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-sql
* Alvaro Herrera:

>> > Florian Weimer <fw@deneb.enyo.de> writes:
>> >> Is it possible to create an index to support queries of the form
>> >> "column LIKE '%suffix'" (similar to an ordinary index for LIKE
>> >> 'prefix%', which I also need)?
>
> It is possible to create a functional index on the reverse of the
> string.

Okay.  Is there a predefined reverse function?  I couldn't find one
and I'm wondering if I just missed it.

> Whether or not this beats tsearch2 is something you should investigate ...

It's also possible that for this type of query, sequential scans are
good enough.  I forgot that they are quite fast.


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

Предыдущее
От: "Mauricio Fernandez A."
Дата:
Сообщение: Re: Slow update SQL
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Index to support LIKE '%suffix' queries