Re: Glacial delete - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Glacial delete
Date
Msg-id Pine.BSF.4.21.0108181050480.91198-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Glacial delete  ("P.J. \"Josh\" Rovero" <rovero@sonalysts.com>)
List pgsql-general
On Sat, 18 Aug 2001, P.J. "Josh" Rovero wrote:

> Have a pretty simple table with about 420K rows:
>
>                  Table "wx_grib_file"
>    Attribute   |           Type           | Modifier
> --------------+--------------------------+----------
>   grib_file_id | oid                      | not null
>   name         | character(40)            |
>   parse_time   | timestamp with time zone |
> Index: wx_grib_file_pkey
>
> In psql, trying to delete a number of rows is extremely slow. Aggregates
> (count, min, max, etc) run in a couple of seconds.  But a delete
> using a range of grib_file_id or parse_time takes about a second
> per row, which is painful for deletes of thousands of records.

Do you have any triggers or rules on the table?  Are you doing
a single delete of many records or multiple deletes of 1?  If the
latter, are you doing them in an explicit transaction or 1 transaction
per delete?  What does explain show for the delete?



pgsql-general by date:

Previous
From: "P.J. \"Josh\" Rovero"
Date:
Subject: Glacial delete
Next
From: Stephen Robert Norris
Date:
Subject: Re: Serial not so unique?