Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux