Re: VACUUM ANALYZE is faster than ANALYZE? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: VACUUM ANALYZE is faster than ANALYZE?
Date
Msg-id CA+TgmoZmf36SNXzsVUbKRXq6bo-+w9M0yuAEJ7gJkppg_g5b=g@mail.gmail.com
Whole thread Raw
In response to Re: VACUUM ANALYZE is faster than ANALYZE?  (Nicolas Barbier <nicolas.barbier@gmail.com>)
Responses Re: VACUUM ANALYZE is faster than ANALYZE?  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On Wed, Feb 22, 2012 at 8:13 AM, Nicolas Barbier
<nicolas.barbier@gmail.com> wrote:
> 2012/2/22 Robert Haas <robertmhaas@gmail.com>:
>
>> On Tue, Feb 21, 2012 at 9:00 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>>
>>> I had to reply to query about usage VACUUM ANALYZE or ANALYZE. I
>>> expected so ANALYZE should be faster then VACUUM ANALYZE.
>>>
>>> But is not true. Why?
>>
>> I'm pretty sure that VACUUM ANALYZE *will* be faster than ANALYZE in
>> general, because VACUUM has to scan the whole table, and ANALYZE only
>> a fixed-size subset of its pages.
>
> It sounds like you just said the opposite of what you wanted to say.

Yeah, I did.  Woops.  Let me try that again:

ANALYZE should be faster; reads only some pages.

VACUUM ANALYZE should be slower; reads them all.

Dunno why Pavel's seeing the opposite without more info.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: 16-bit page checksums for 9.2
Next
From: Simon Riggs
Date:
Subject: Re: VACUUM ANALYZE is faster than ANALYZE?