Re: Index not being used - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Index not being used
Date
Msg-id 20020214150423.R24897-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Index not being used  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Index not being used  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Thu, 14 Feb 2002, Josh Berkus wrote:

> Matthew,
>
> 1. Is field cdate DATE or TIMESTAMP?
> 2. What happens with:
> EXPLAIN SELECT cdate FROM sometable WHERE cdate = '2001-02-14'::DATE or
>  TIMESTAMP?
> 3. Please time both queries and give the number of resulting rows from
>  both queries.

Something tells me that current_date is probably not in a form that's
considered indexable.  You could probably get around that with an
iscachable function hiding it however.



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Index not being used
Next
From: Tom Lane
Date:
Subject: Re: Index not being used