From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Steve Oualline" <soualline(at)stbernard(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org, "Jiu Zheng" <Jiu(at)stbernard(dot)com> |
Subject: | Re: VACUUM Performance |
Date: | 2006-10-21 05:02:06 |
Message-ID: | 21641.1161406926@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
"Steve Oualline" <soualline(at)stbernard(dot)com> writes:
> Question: I have a big table with 120,000,000 records.
> Let's assume that I DELETE 4,000,000 records, VACUUM FULL, and REINDEX.
> Now I have the same table, but with 240,000,000 records.
> I DELETE 8,000,000 records, VACUUM FULL, and REINDEX.
> Should the second operation with twice the data take twice the time as =
> the first?
At least. If you intend to reindex all the indexes, consider instead
doing
DROP INDEX(es)
VACUUM FULL
re-create indexes
as this avoids the very large amount of effort that VACUUM FULL puts
into index maintenance --- effort that's utterly wasted if you then
reindex.
CLUSTER and some forms of ALTER TABLE can accomplish a table rewrite
with less hassle than the above, although strictly speaking they violate
MVCC by discarding recently-dead tuples.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Péter Kovács | 2006-10-21 10:22:25 | Re: Index on two columns not used |
Previous Message | Joshua D. Drake | 2006-10-21 03:40:12 | Re: Is ODBC that slow? |