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 <tgl@sss.pgh.pa.us>) |
Ответы |
Re: DELETE vs TRUNCATE explanation
|
Список | pgsql-performance |
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 по дате отправления: