> I have noticed that with a SELECT query containing the following
> column LIKE ?
> and an index on that column, PostgreSQL will not use the index
> even if the parameter doesn't contain special pattern characters
> such as %.
you should have a postgresql 8.3,isn't it ?
like is equal to "=" in your case, since 8.4
Also you probably want to have a look at
about your index definition (add the "text_pattern_ops" when required)
Cédric Villemain +33 (0)6 20 30 22 52
PostgreSQL: Support 24x7 - Développement, Expertise et Formation
In response to
pgsql-performance by date
|Next:||From: Rural Hunter||Date: 2012-06-08 13:33:08|
|Subject: how to change the index chosen in plan?|
|Previous:||From: Guillaume Cottenceau||Date: 2012-06-08 11:11:11|
|Subject: non index use on LIKE on a non pattern string|