X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1DB705E46E1 for ; Sun, 29 Aug 2004 23:09:59 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08706-04 for ; Mon, 30 Aug 2004 02:09:55 +0000 (GMT) Received: from web41110.mail.yahoo.com (web41110.mail.yahoo.com [66.218.93.26]) by svr1.postgresql.org (Postfix) with SMTP id D75A25E46D4 for ; Sun, 29 Aug 2004 23:09:53 -0300 (ADT) Message-ID: <20040830020954.3596.qmail@web41110.mail.yahoo.com> Received: from [210.230.185.241] by web41110.mail.yahoo.com via HTTP; Sun, 29 Aug 2004 19:09:54 PDT Date: Sun, 29 Aug 2004 19:09:54 -0700 (PDT) From: Mr Pink Subject: Re: Why does a simple query not use an obvious index? To: pgsql-performance@postgresql.org In-Reply-To: <87llfxk5v6.fsf@stark.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/437 X-Sequence-Number: 8073 --- Greg Stark wrote: > > Mr Pink 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