Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group