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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Hampl <Martin(dot)Hampl(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: indexing with lower(...) -> queries are not optimised very well - Please Help
Date: 2003-11-21 05:54:49
Message-ID: 9549.1069394089@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martin Hampl <Martin(dot)Hampl(at)gmx(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-11-21 05:57:56 Re: problem running postmaster
Previous Message Tom Lane 2003-11-21 05:50:00 Re: Lock questions