Re: Glacial delete
От | Stephan Szabo |
---|---|
Тема | Re: Glacial delete |
Дата | |
Msg-id | Pine.BSF.4.21.0108181050480.91198-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Glacial delete ("P.J. \"Josh\" Rovero" <rovero@sonalysts.com>) |
Список | 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 по дате отправления: