Re: Is my text_pattern_ops index working for a LIKE prefix searchwith column reference?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Is my text_pattern_ops index working for a LIKE prefix searchwith column reference?
Дата
Msg-id d599d4592b68dbac18beab4daf15358a4bfa9b64.camel@cybertec.at
обсуждение исходный текст
Ответ на Is my text_pattern_ops index working for a LIKE prefix search withcolumn reference?  (Seamus Abshere <seamus@abshere.net>)
Ответы Re: Is my text_pattern_ops index working for a LIKE prefix search with column reference?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Seamus Abshere wrote:
> I created an index with text_pattern_ops because I want fast prefix search [1] [2].
> 
> ...but I don't think it's working when I use a column reference || '%'...

An index can only be used for expressions like

   <indexed expression> <operator from the opclass> <constant>

and you have a column refrence on the right side.

Perhaps you can rephrase your query in such a fashion.

Yours,
Laurenz Albe



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Join condition parsing puzzle
Следующее
От: Raghavendra Rao J S V
Дата:
Сообщение: