Re: 7.3.1 takes long time to vacuum table?
От | Martijn van Oosterhout |
---|---|
Тема | Re: 7.3.1 takes long time to vacuum table? |
Дата | |
Msg-id | 20030220042140.GF10807@svana.org обсуждение исходный текст |
Ответ на | Re: 7.3.1 takes long time to vacuum table? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
On Wed, Feb 19, 2003 at 10:37:45PM -0500, Tom Lane wrote: > Martijn van Oosterhout <kleptog@svana.org> writes: > > You could do the jump-back-in-blocks only if more than 30% of the table is > > empty and table is over 1GB. For the example here, a simple defragging > > algorithm would suffice; start at beginning and pack each tuple into the > > beginning of the file. It will move *every* tuple but it's more cache > > friendly. It's pretty extreme though. > > And your evidence that it will actually be faster is ... ? Will, in this guy's example, the first stage of the vacuum (scan_heap) finished in a few hours but the second stage is still going after 50 hours and estimating a bit over half done. The major difference between the two is that the latter goes backwards through the table and the other forwards. Sure, it's anecdotal and a bit hand wavey but I think there's something to it. Come to think of it, if that strace had used -tt it would have been more interesting. Anyway, the test would be to implement it and them time it. The vacuum code looks scary though. I'm not sure if I want to mess with it... -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Support bacteria! They're the only culture some people have.
Вложения
В списке pgsql-general по дате отправления: