Re: indexing with lower(...) -> queries are not optimised very well - Please Help - Mailing list pgsql-general

From Tom Lane
Subject Re: indexing with lower(...) -> queries are not optimised very well - Please Help
Date
Msg-id 9549.1069394089@sss.pgh.pa.us
Whole thread Raw
In response to indexing with lower(...) -> queries are not optimised very well - Please Help  (Martin Hampl <Martin.Hampl@gmx.de>)
Responses Re: indexing with lower(...) -> queries are not optimised very well - Please Help  (Martin Hampl <Martin.Hampl@gmx.de>)
Re: indexing with lower(...) -> queries are not optimised very well - Please Help  (Martin Hampl <Martin.Hampl@gmx.de>)
List pgsql-general
Martin Hampl <Martin.Hampl@gmx.de> writes:
>   Index Scan using word_lower_idx on token  (cost=0.00..98814.08
> rows=25382 width=16)
>     Index Cond: (lower((word)::text) = 'saxophone'::text)

The rows estimate (and therefore also the cost estimate) is a complete
guess in this situation, because the system keeps no statistics about
the values of lower(word).  Improving this situation is on the TODO list.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Lock questions
Next
From: Tom Lane
Date:
Subject: Re: problem running postmaster