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