Re: Why does a simple query not use an obvious index? - Mailing list pgsql-performance

From Mr Pink
Subject Re: Why does a simple query not use an obvious index?
Date
Msg-id 20040830020954.3596.qmail@web41110.mail.yahoo.com
Whole thread Raw
In response to Re: Why does a simple query not use an obvious index?  (Greg Stark <gsstark@mit.edu>)
Responses Re: Why does a simple query not use an obvious index?
List pgsql-performance
--- Greg Stark <gsstark@mit.edu> wrote:

>
> Mr Pink <mr_pink_is_the_only_pro@yahoo.com> writes:
>
> > AFAIK postgres doesn't peek at values used in a query when optimizing
>
> Of course it does.

But not ones returned by a function such as now(), or when you use bind variables, as Tom aptly
explained.

That's what I meant by 'peek'. Interestingly enough Oracle does that, it's inline with their
policy of recommending the use of bind variables. Perhaps postgres could use such a feature some
day.





__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

pgsql-performance by date:

Previous
From: Russell Smith
Date:
Subject: Re: Query performance problem in 8.0.0beta1
Next
From: Tom Lane
Date:
Subject: Re: Why does a simple query not use an obvious index?