Re: [HACKERS] Some notes on optimizer cost estimates

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Some notes on optimizer cost estimates
Дата
Msg-id 200001210248.VAA07186@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Some notes on optimizer cost estimates  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы RE: [HACKERS] Some notes on optimizer cost estimates  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Re: [HACKERS] Some notes on optimizer cost estimates  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Some notes on optimizer cost estimates  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > I've wondered why we cound't analyze database without vacuum.
> > We couldn't run vacuum light-heartedly because it acquires an
> > exclusive lock for the target table. 
> 
> There is probably no real good reason, except backwards compatibility,
> why the ANALYZE function (obtaining pg_statistic data) is part of
> VACUUM at all --- it could just as easily be a separate command that
> would only use read access on the database.  Bruce is thinking about
> restructuring VACUUM, so maybe now is a good time to think about
> splitting out the ANALYZE code too.

I put it in vacuum because at the time I didn't know how to do such
things and vacuum already scanned the table.  I just linked on the the
scan.  Seemed like a good idea at the time.

It is nice that ANALYZE is done during vacuum.  I can't imagine why you
would want to do an analyze without adding a vacuum to it.  I guess
that's why I made them the same command.

If I made them separate commands, both would have to scan the table,
though the analyze could do it without the exclusive lock, which would
be good.

--  Bruce Momjian                        |  http://www.op.net/~candle pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] timezone problem?
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] Some notes on optimizer cost estimates