Re: What index for 'like (%keyword%)' ???

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: What index for 'like (%keyword%)' ???
Дата
Msg-id 406B6E0B.9050200@familyhealth.com.au
обсуждение исходный текст
Ответ на What index for 'like (%keyword%)' ???  ("Priem, Alexander" <ap@cict.nl>)
Список pgsql-performance
> I am building a query which uses a clause like "Where doc_description like
> '%keyword%'". I know a normal index won't be of any use here, but since the
> table in question will get fairly big, I do want to use an index.
>
> Can anyone give me some advise on what kind of index I can use here? Or
> shouldn't I use one in this case?

You have to use a proper full text indexing scheme.  Investigate
contrib/tsearch2 module in the postgres distribution.

Chirs


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

Предыдущее
От: Gaetano Mendola
Дата:
Сообщение: linux and anotime mount option
Следующее
От: "Gary Doades"
Дата:
Сообщение: PostgreSQL and Linux 2.6 kernel.