kavoos writes:
> create index lower_title on titles (lower(title));
> vacuum analyze;
> ...
> explain select * from titles where lower(title) = 'monde';
> Seq Scan on titles (cost=0.00..39392.10 rows=14145 width=44)
>
> Why it does not use the index ?
The planner estimates that this query returns 14145 rows. If this is more
than a small fraction of the rows in this table then a sequential scan is
better than an index scan.
The questions are, how many rows does this query really return, and how
many rows are in this table. Btw., this is discussed in the manual under
performance tips.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter