Re: [SQL] Best way to delete time stamped data?

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Kyle <kyle(at)ccidomain(dot)com>
Cc: Forum - PostGreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: [SQL] Best way to delete time stamped data?
Date: 2003-05-04 16:30:29
Message-ID: 20030504113029.W66185@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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(at)nasby(dot)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?"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Luc Lachance 2003-05-04 17:12:19 Re: [SQL] Best way to delete time stamped data?
Previous Message Kyle 2003-05-04 13:09:05 Re: [SQL] Best way to delete time stamped data?

Browse pgsql-sql by date

  From Date Subject
Next Message Jean-Luc Lachance 2003-05-04 17:12:19 Re: [SQL] Best way to delete time stamped data?
Previous Message Kyle 2003-05-04 13:09:05 Re: [SQL] Best way to delete time stamped data?