From: | Hubert depesz Lubaczewski <depesz(at)depesz(dot)pl> |
---|---|
To: | Raymond Chui <raymond(dot)chui(at)noaa(dot)gov>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Fast Deletion For Large Tables |
Date: | 2002-10-05 08:21:36 |
Message-ID: | 20021005082136.GA23998@depesz.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support pgsql-admin pgsql-general |
On Wed, Oct 02, 2002 at 02:20:39PM -0400, Raymond Chui wrote:
> Everything is running fine, except take long time to finish.
> Because some tables stored values from 50,000 to 100,000 rows
> Some deletion need to deleted up to 45,000 rows.
how often do you make this "delete" process?
do you vacuum before *and* after it?
with deleteing 45000 out of 50000 (or 100000) records no index can speed
up. anyway - deleting 45000 records shouldn't take very long.
do you have any foreign keys from this table to others? any indices?
try maybe this path:
connect
vacuum
drop indices
disconnect
connect
delete from ...
create indices
vacuum analyze
disconnect
could work better.
depesz
--
hubert depesz lubaczewski http://www.depesz.pl/
------------------------------------------------------------------------
Mój Boże, spraw abym milczał, dopóki się nie upewnię, że naprawdę mam
coś do powiedzenia. (c) 1998 depesz
From | Date | Subject | |
---|---|---|---|
Next Message | Nikolaus Dilger | 2002-10-06 03:17:38 | Re: [ADMIN] Fast Deletion For Large Tables |
Previous Message | lars hofhansl | 2002-10-05 00:53:17 | deadlock using sequences? |
From | Date | Subject | |
---|---|---|---|
Next Message | Ragnar Kjørstad | 2002-10-05 22:47:55 | Re: PostgreSQL and 2-node failover cluster solutions |
Previous Message | Jie Liang | 2002-10-05 00:05:46 | 3 million record updates |
From | Date | Subject | |
---|---|---|---|
Next Message | Lars | 2002-10-05 09:31:43 | deadlock using sequences? |
Previous Message | Thomas O'Dowd | 2002-10-05 06:53:47 | Re: [HACKERS] Advice: Where could I be of help? |