Re: [HACKERS] Re: vacuum timings
От | The Hermit Hacker |
---|---|
Тема | Re: [HACKERS] Re: vacuum timings |
Дата | |
Msg-id | Pine.BSF.4.21.0001211607080.23487-100000@thelab.hub.org обсуждение исходный текст |
Ответ на | Re: [HACKERS] Re: vacuum timings (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] Re: vacuum timings
|
Список | pgsql-hackers |
On Fri, 21 Jan 2000, Bruce Momjian wrote: > [Charset koi8-r unsupported, filtering to ASCII...] > > Tom Lane wrote: > > > > > > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > > > Conclusions: > > > > o indexes never get smaller > > > > > > Which we knew... > > > > > > > o drop/recreate index is slower than vacuum of indexes > > > > > > Quite a few people have reported finding the opposite in practice. > > > > I'm one of them. On 1,5 GB table with three indices it about twice > > slowly. > > Probably becouse vacuuming indices brakes system cache policy. > > (FreeBSD 3.3) > > OK, we are researching what things can be done to improve this. We are > toying with: > > lock table for less duration, or read lock if there is some way that we can work around the bug that I believe Tom found with removing the lock altogether (ie. makig use of MVCC), I think that would be the best option ... if not possible, at least get things down to a table lock vs the whole database? a good example is the udmsearch that we are using on the site ... it uses multiple tables to store the dictionary, each representing words of X size ... if I'm searching on a 4 letter word, and the whole database is locked while it is working on the dictionary with 8 letter words, I'm sitting there idle ... at least if we only locked the 8 letter table, everyone not doing 8 letter searches can go on their merry way ... Slightly longer vacuum's, IMHO, are acceptable if, to the end users, its as transparent as possible ... locking per table would be slightly slower, I think, because once a table is finished, the next table would need to have an exclusive lock put on it before starting, so you'd have to possibly wait for that...? > creating another copy of heap/indexes, and rename() over old files sounds to me like introducing a large potential for error here ... > moving analyze out of vacuum I think that should be done anyway ... if we ever get to the point that we're able to re-use rows in tables, then that would eliminate the immediate requirement for vacuum, but still retain a requirement for a periodic analyze ... no? Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
В списке pgsql-hackers по дате отправления: