Re: [PERFORMANCE] slow small delete on large table - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: [PERFORMANCE] slow small delete on large table
Date
Msg-id 20040224030017.GA2872@wolff.to
Whole thread Raw
In response to [PERFORMANCE] slow small delete on large table  ("Ed L." <pgsql@bluepolka.net>)
List pgsql-performance
On Mon, Feb 23, 2004 at 19:10:57 -0700,
  "Ed L." <pgsql@bluepolka.net> wrote:
>
> A 7.3.4 question...
>
> I want to "expire" some data after 90 days, but not delete too
> much at once so as not to overwhelm a system with precariously
> balanced disk I/O and on a table with millions of rows.  If I
> could say it the way I think for a simple example, it'd be
> like this:

If there aren't foreign keys into the table from which rows are being
deleted, then a delete shouldn't have a big impact on the system.
If you do the expires frequently, then there won't be as many records
to delete at one time. The other response showed you how to avoid the
sequential scan, which is the other part of the problem.

pgsql-performance by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: [PERFORMANCE] slow small delete on large table
Next
From: Kevin Brown
Date:
Subject: Re: Column correlation drifts, index ignored again