Re: inconsistent/weird index usage

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Dustin Sallings <dustin(at)spy(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: inconsistent/weird index usage
Date: 2004-10-02 23:44:21
Message-ID: 27189.1096760661@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hannu Krosing <hannu(at)tm(dot)ee> writes:
>> No. It's not fixed as of CVS tip either, although there was some talk
>> of doing something in time for 8.0.

> That's weird - my 7.4.2 databases did not consider (now()-'15
> min'::interval) to be a constant whereas 7.4.5 does (i.e. it does use
> index scan on index on datetime column)

The question isn't whether it can use it as an indexscan bound; the
question is whether it can derive an accurate rowcount estimate.
The issue is exactly that STABLE functions work for one but not the
other.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Pierre-Frédéric Caillaud 2004-10-03 13:20:49 Re: Caching of Queries
Previous Message Tom Lane 2004-10-02 23:21:16 Re: Query planner problem