Re: Problem with LIKE-Performance

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

 





Dave Dutcher a écrit :
It looks like you are getting a sequential scan instead of an index
scan.  What is your locale setting?  As far as I know Postgres doesn't
support using indexes with LIKE unless you are using the C locale.
It does if you create your index this way :

CREATE INDEX idx_image_title
 ON image
 USING btree
 (title varchar_pattern_ops);

Please see http://www.postgresql.org/docs/8.1/interactive/indexes-opclass.html


Thomas



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux