X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id ADFBE4762EF for ; Mon, 5 May 2003 09:31:13 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by postgresql.org (Postfix) with SMTP id E917A474E42 for ; Mon, 5 May 2003 09:31:12 -0400 (EDT) Received: (qmail 3038 invoked by uid 500); 5 May 2003 13:32:22 -0000 Date: Mon, 5 May 2003 08:32:22 -0500 From: Bruno Wolff III To: Rajesh Kumar Mallah Cc: josh@agliodbs.com, Kyle , Forum - PostGreSQL SQL Subject: Re: Best way to delete time stamped data? Message-ID: <20030505133222.GA2981@wolff.to> Mail-Followup-To: Rajesh Kumar Mallah , josh@agliodbs.com, Kyle , Forum - PostGreSQL SQL References: <3EB2EBF0.8010003@ccidomain.com> <200305021619.41879.josh@agliodbs.com> <200305051526.21885.mallah@trade-india.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200305051526.21885.mallah@trade-india.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-21.8 required=5.0 tests=BAYES_10,IN_REP_TO,REFERENCES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/50 X-Sequence-Number: 13215 On Mon, May 05, 2003 at 15:26:21 +0530, Rajesh Kumar Mallah wrote: > > > an index on age(date(trxdate)) would make it faster ? That won't work because the value returned by age depends on the time the transaction started. If you want the delete to be indexed you need to write it out the longer way.