1 Apr 2005 01:33
Re: truncate/create slowness
Tom Lane <tgl <at> sss.pgh.pa.us>
2005-03-31 23:33:32 GMT
2005-03-31 23:33:32 GMT
"Julian Scarfe" <julian <at> avbrief.com> writes: > Do you have any rules of thumb for deciding when a pg_dumpall/restore is > likely to be faster than a vacuum full? Or perhaps more straightforwardly, > how would you expect the time required for a vacuum full to scale with pages > used and rows in the table? There is a factor that's proportional to the number of tuples deleted, and a bigger factor that's proportional to the number of tuples moved while trying to compact the table. If you've got a seriously bloated table then it's fairly likely that *all* the surviving tuples will get moved because none of them are near the start of the table alreadyHaving said that, though, a vacuum full and reindex on pg_class and pg_attribute will certainly solve Steve's problem faster than a dump and reload, simply because there's not much stuff in those catalogs compared to any reasonably-sized user tables. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo <at> postgresql.org)
Having said that, though, a vacuum full and reindex on pg_class and
pg_attribute will certainly solve Steve's problem faster than a dump
and reload, simply because there's not much stuff in those catalogs
compared to any reasonably-sized user tables.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo <at> postgresql.org)
).
Regards,
Andy
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
RSS Feed