pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hannu Krosing <hannu@tm.ee>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Dustin Sallings <dustin@spy.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: inconsistent/weird index usage
Date: Sat, 02 Oct 2004 19:44:21 -0400
Message-ID: <27189.1096760661@sss.pgh.pa.us> (raw)
In-Reply-To: <1096759241.5508.2.camel@fuji.krosing.net>
References: <6FA9AB99-1373-11D9-A87D-000A957659CC@spy.net>
	<9345.1096641526@sss.pgh.pa.us>
	<200410010929.36026.josh@agliodbs.com>
	<10775.1096648455@sss.pgh.pa.us>
	<1096759241.5508.2.camel@fuji.krosing.net>

Hannu Krosing <hannu@tm.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



view thread (8+ messages)

Message-ID: <27189.1096760661@sss.pgh.pa.us>
Permalink:  ../27189.1096760661@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27189.1096760661@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hannu@tm.ee, josh@agliodbs.com, dustin@spy.net
  Subject: Re: inconsistent/weird index usage
  In-Reply-To: <27189.1096760661@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox