X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1EE12D1B554 for ; Wed, 22 Oct 2003 20:28:03 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 81495-10 for ; Wed, 22 Oct 2003 17:27:33 -0300 (ADT) Received: from davinci.ethosmedia.com (unknown [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id E871FD1B55A for ; Wed, 22 Oct 2003 17:27:30 -0300 (ADT) Received: from [66.219.92.2] (HELO temoku) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3807708; Wed, 22 Oct 2003 13:28:11 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: "scott.marlowe" , Chris Gamache Subject: Re: Query planner: current_* vs. explicit date Date: Wed, 22 Oct 2003 13:25:18 -0700 User-Agent: KMail/1.4.3 Cc: pgsql-sql References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200310221325.18470.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/292 X-Sequence-Number: 15692 Scott, Chris, > I'd guess that the planner doesn't know what current_date::timestamp is= =20 > ahead of time, so it chooses a seq scan. Yes, this is a known problem. There was a single-query workaround, but I= =20 can't remember it right now. --=20 -Josh Berkus Aglio Database Solutions San Francisco