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

From: Martin Hampl <Martin(dot)Hampl(at)gmx(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: indexing with lower(...) -> queries are not optimised very well - Please Help
Date: 2004-01-16 21:18:44
Message-ID: 910B2C48-4869-11D8-9C4F-000393674318@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Am 21.11.2003 um 06:54 schrieb Tom Lane:

> 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.

Any ideas when this will work? Is it difficult to implement?

(For those who don't recall the context: I asked about indexing lower
values of a varchar-coloumn ("create index xy_idx on
table(lower(coloumn));") and how the query planner uses this index).

Regards,
Martin.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Bowden 2004-01-16 21:39:12 Re: embedded/"serverless" (Re: serverless postgresql)
Previous Message Tom Lane 2004-01-16 21:14:06 Re: embedded/"serverless" (Re: serverless postgresql)