[EMAIL PROTECTED] (Shridhar Daithankar) writes:

> Andrew Sullivan wrote:
>
>> On Fri, Oct 17, 2003 at 07:04:45PM +0530, Shridhar Daithankar wrote:
>>
>>> I am slightly confused here. IIRC pg_autovacuum never did a vacuum
>>> full. At the most it does vacuum /vacuum analyse, none of which
>>> chew disk bandwidth.
>> The latter is false.  VACUUM FULL certainly uses _more_ disk
>> bandwidth than VACUUM, but it's just false that plain VACUUM doesn't
>> contend for disk.  And if you're already maxed, then that extra
>> bandwidth you cannot afford.
>
> What part of plain vacuum takes disk bandwidth? WAL? Clog? Certainly
> not data files themselves, right?

Certainly YES, the data files themselves.

VACUUM has to read through the pages to assess what tuples are to
expire.  So if the data file is 8GB long, VACUUM has to read through
8GB of data.

As compared to VACUUM FULL, it is certainly cheaper, as it is not
rummaging around to reorder pages, but rather walking through, single
page by single page.  Thus, where VACUUM FULL might involve (in
effect) reading through the file several times (as it shifts data
between pages), VACUUM only reads through it once.  

That's (for the "for instance") 8GB of reads.
-- 
"cbbrowne","@","libertyrms.info"
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 646 3304 x124 (land)

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to