From: Jim C. Nasby <jim@nasby.net>
To: Kyle <kyle@ccidomain.com>
Cc: Forum - PostGreSQL General <pgsql-general@postgresql.org>
Subject: Re: [SQL] Best way to delete time stamped data?
Date: Sun, 4 May 2003 11:30:29 -0500
Message-ID: <20030504113029.W66185@flake.decibel.org> (raw)
In-Reply-To: <3EB510F1.8090708@ccidomain.com>
References: <3EB2EBF0.8010003@ccidomain.com>
<200305021619.41879.josh@agliodbs.com>
<3EB510F1.8090708@ccidomain.com>
On Sun, May 04, 2003 at 09:09:05AM -0400, Kyle wrote:
> Josh,
>
> Thanks, even my boss can read the new statement:
>
> DELETE FROM ONLY richtable WHERE age(trxdate) > '90 days';
Just remember that that query won't use any index on trxdate, because
it has to calculate 'age(trxdate)' for every value in the table.
--
Jim C. Nasby (aka Decibel!) jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jim@nasby.net, kyle@ccidomain.com, pgsql-general@postgresql.org
Subject: Re: [SQL] Best way to delete time stamped data?
In-Reply-To: <20030504113029.W66185@flake.decibel.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox