Skip site navigation (1) Skip section navigation (2)

Re: VACUUM ANALYZE is faster than ANALYZE?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VACUUM ANALYZE is faster than ANALYZE?
Date: 2012-02-22 12:59:39
Message-ID: CA+Tgmob=6Ve2=LoirsToHRdfD5AAJOW4_ZRFp-qG0LR_AGMRtg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Feb 21, 2012 at 9:00 AM, 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.
>
> 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.  Not sure what's happening in your
particular case...

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

In response to

Responses

pgsql-hackers by date

Next:From: Nicolas BarbierDate: 2012-02-22 13:13:34
Subject: Re: VACUUM ANALYZE is faster than ANALYZE?
Previous:From: Robert HaasDate: 2012-02-22 12:57:50
Subject: Re: leakproof

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group