Re: replacements for vacuum?
От | Greg Stark |
---|---|
Тема | Re: replacements for vacuum? |
Дата | |
Msg-id | 87k6rggj9k.fsf@stark.xeocode.com обсуждение исходный текст |
Ответ на | Re: replacements for vacuum? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
Tom Lane <tgl@sss.pgh.pa.us> writes: > Lonni J Friedman <netllama@gmail.com> writes: > > > I'd like to be able to run vacuum in a 'test' or read-only mode where > > i'd see what it would do before actually running it. > > Er ... what possible value would that have? ISTM it would expend 80% of > the effort to achieve 0% of the result. Just a guess, maybe you mean "analyze" when you say "vacuum"? People often conflate them since they often run both together with "vacuum analyze". But there wouldn't be much point in running a test vacuum, they're might be some point in running a test analyze. If so, one little known feature: you can run analyze inside a transaction. The new statistics are only used by that session until you commit. I started a script to explain a set of queries, run analyze, then re-explain the queries and compare the plans before either committing or rolling back. I think it would be a useful DBA tool for a high availability production system, but I haven't finished it. -- greg
В списке pgsql-general по дате отправления: