Re: Index not being used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Matthew Price <pricem(at)juno(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Index not being used
Date: 2002-02-15 00:46:38
Message-ID: 10780.1013733998@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> Something tells me that current_date is probably not in a form that's
> considered indexable.

More to the point, it's not considered a constant.

You could write
WHERE cdate = date 'now'
instead.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-02-15 01:04:44 Re: trigger on table
Previous Message Stephan Szabo 2002-02-14 23:08:45 Re: Index not being used