Re: Why does a simple query not use an obvious index?

From: Mr Pink <mr_pink_is_the_only_pro(at)yahoo(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Why does a simple query not use an obvious index?
Date: 2004-08-30 02:09:54
Message-ID: 20040830020954.3596.qmail@web41110.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


--- Greg Stark <gsstark(at)mit(dot)edu> wrote:

>
> Mr Pink <mr_pink_is_the_only_pro(at)yahoo(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-08-30 02:23:56 Re: Why does a simple query not use an obvious index?
Previous Message Russell Smith 2004-08-29 22:31:30 Re: Query performance problem in 8.0.0beta1