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?