Re: [PERFORM] non index use on LIKE on a non pattern string

2012-06-08 Thread Cédric Villemain
Le vendredi 8 juin 2012 15:57:07, Tom Lane a écrit : > =?iso-8859-1?q?C=E9dric_Villemain?= writes: > >> I have noticed that with a SELECT query containing the following > >> constraint: > >> > >> column LIKE ? > >> > >> and an index on that column, PostgreSQL will not use the index > >> even if

Re: [PERFORM] non index use on LIKE on a non pattern string

2012-06-08 Thread Tom Lane
=?iso-8859-1?q?C=E9dric_Villemain?= writes: >> I have noticed that with a SELECT query containing the following >> constraint: >> >> 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 %

Re: [PERFORM] non index use on LIKE on a non pattern string

2012-06-08 Thread Cédric Villemain
> I have noticed that with a SELECT query containing the following > constraint: > > 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 ? l

[PERFORM] non index use on LIKE on a non pattern string

2012-06-08 Thread Guillaume Cottenceau
Hello, I have noticed that with a SELECT query containing the following constraint: 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 %. >From PG POV it might be logical, because, who is stup