Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1EN8iE00623 for ; Thu, 14 Feb 2002 18:08:44 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id C8E96D5F7; Thu, 14 Feb 2002 15:08:45 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id BE6145BF9; Thu, 14 Feb 2002 15:08:45 -0800 (PST) Date: Thu, 14 Feb 2002 15:08:45 -0800 (PST) From: Stephan Szabo To: Josh Berkus Cc: Matthew Price , Subject: Re: Index not being used In-Reply-To: Message-ID: <20020214150423.R24897-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200202/166 X-Sequence-Number: 6592 On Thu, 14 Feb 2002, Josh Berkus wrote: > Matthew, > > 1. Is field cdate DATE or TIMESTAMP? > 2. What happens with: > EXPLAIN SELECT cdate FROM sometable WHERE cdate = '2001-02-14'::DATE or > TIMESTAMP? > 3. Please time both queries and give the number of resulting rows from > both queries. Something tells me that current_date is probably not in a form that's considered indexable. You could probably get around that with an iscachable function hiding it however.