Re: [HACKERS] vacuum slowness - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] vacuum slowness
Date
Msg-id 19558.921721956@sss.pgh.pa.us
Whole thread Raw
In response to vacuum slowness  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> I just deleted all 50,000 rows from a table that has one int4 and one text
> field.

> Why does vacuum take so long?  If all the rows are superceeded, so no
> rows actually have to be moved, should it take so long for vacuum to
> run?

Do you have any indexes on the table?  I've noticed (and complained in
the past ;-)) that vacuuming a table takes unreasonably long if there
are a lot of dead index entries to be cleaned.  It seems faster to drop
and recreate the index in a case like that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Sequences....
Next
From: Vadim Mikheev
Date:
Subject: Re: vacuum slowness