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 9480DD1B54C for ; Thu, 16 Oct 2003 16:49:13 +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 40500-09 for ; Thu, 16 Oct 2003 13:48:43 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id F1611D1B501 for ; Thu, 16 Oct 2003 13:48:41 -0300 (ADT) Received: (qmail 28077 invoked by uid 500); 16 Oct 2003 16:56:29 -0000 Date: Thu, 16 Oct 2003 11:56:29 -0500 From: Bruno Wolff III To: teknokrat Cc: pgsql-sql@postgresql.org Subject: Re: indexing timestamp fields Message-ID: <20031016165629.GA28009@wolff.to> Mail-Followup-To: teknokrat , pgsql-sql@postgresql.org References: <60wub6wjxf.fsf@dev6.int.libertyrms.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/192 X-Sequence-Number: 15592 On Wed, Oct 15, 2003 at 21:25:17 +0100, teknokrat wrote: > > I have a lot of queries of the " where timestamp < some date " type and > was wondering if an index would improve performance. None of the > timestamps are null and they are always populated Unless that query returns only a small fraction of the table (which would be unusual for a before some date restriction) or you order by the date, an index probably won't help.