Re: DELETE vs TRUNCATE explanation
От
Matthew Woodcraft
Тема
Re: DELETE vs TRUNCATE explanation
Дата
Msg-id
20120711181037.GF11608@golux.woodcraft.me.uk
Ответ на
Re: DELETE vs TRUNCATE explanation (Tom Lane)
Список
Дерево обсуждения
DELETE vs TRUNCATE explanation Craig Ringer <ringerc@ringerc.id.au>
Re: DELETE vs TRUNCATE explanation Daniel Farina <daniel@heroku.com>
Re: DELETE vs TRUNCATE explanation Tom Lane <tgl@sss.pgh.pa.us>
Re: DELETE vs TRUNCATE explanation "ktm@rice.edu" <ktm@rice.edu>
Re: DELETE vs TRUNCATE explanation Matthew Woodcraft <matthew@woodcraft.me.uk>
Re: DELETE vs TRUNCATE explanation Craig Ringer <ringerc@ringerc.id.au>
Re: DELETE vs TRUNCATE explanation Daniel Farina <daniel@heroku.com>
Re: DELETE vs TRUNCATE explanation Craig Ringer <ringerc@ringerc.id.au>
Re: DELETE vs TRUNCATE explanation Daniel Farina <daniel@heroku.com>
Re: DELETE vs TRUNCATE explanation Craig Ringer <ringerc@ringerc.id.au>
Re: DELETE vs TRUNCATE explanation Jeff Janes <jeff.janes@gmail.com>
Re: DELETE vs TRUNCATE explanation "Harold A. Giménez" <harold.gimenez@gmail.com>
Re: DELETE vs TRUNCATE explanation Jeff Janes <jeff.janes@gmail.com>
Re: DELETE vs TRUNCATE explanation Jeff Janes <jeff.janes@gmail.com>
Re: DELETE vs TRUNCATE explanation Craig James <cjames@emolecules.com>
Re: DELETE vs TRUNCATE explanation Shaun Thomas <sthomas@optionshouse.com>
Re: DELETE vs TRUNCATE explanation Andrew Dunstan <andrew@dunslane.net>
Re: DELETE vs TRUNCATE explanation Mark Thornton <mthornton@optrak.com>
Re: DELETE vs TRUNCATE explanation Craig James <cjames@emolecules.com>
Re: DELETE vs TRUNCATE explanation Craig Ringer <ringerc@ringerc.id.au>
Tom Lane wrote: > (3) The performance of the truncation itself should not be viewed in > isolation; subsequent behavior also needs to be considered. An example > of possible degradation is that index bloat would no longer be > guaranteed to be cleaned up over a series of repeated truncations. > (You might argue that if the table is small then the indexes couldn't > be very bloated, but I don't think that holds up over a long series.) > > IOW, I think it's fine as-is. I'd certainly wish to see many more > than one complainant before we expend effort in this area. I think a documentation change would be worthwhile. At the moment the TRUNCATE page says, with no caveats, that it is faster than unqualified DELETE. It surprised me to find that this wasn't true (with 7.2, again with small tables in a testsuite), and evidently it's still surprising people today. -M-
В списке pgsql-performance по дате отправления