On Tue, Feb 21, 2012 at 2:00 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I
> expected so ANALYZE should be faster then VACUUM ANALYZE.
VACUUM ANALYZE scans the whole table sequentially.
ANALYZE accesses a random sample of data blocks. Random access is
slower than sequential access, so at some threshold of sample size and
sequential/random I/O speed ratio ANALYZE could become slower.
So it depends upon the hardware and the setting of stats_target.
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
In response to
pgsql-hackers by date
|Next:||From: Sandro Santilli||Date: 2012-02-22 13:47:53|
|Subject: [PATCH] typo fix|
|Previous:||From: Robert Haas||Date: 2012-02-22 13:33:07|
|Subject: Re: VACUUM ANALYZE is faster than ANALYZE?|