Re: Auto ANALYZE criteria

From: Joe Miller <joe(dot)d(dot)miller(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Auto ANALYZE criteria
Date: 2010-09-21 14:59:24
Message-ID: AANLkTi=qOCZox4n8V6YqqapuQRGN9p4QGeAC2xjc_aLt@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Sep 20, 2010 at 6:28 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Joe Miller <joe(dot)d(dot)miller(at)gmail(dot)com> wrote:
>
>> I can set up a cron job to run the ANALYZE manually, but it seems
>> like the autovacuum daemon should be smart enough to figure this
>> out on its own.  Deletes can have as big an impact on the stats as
>> inserts and updates.
>
> But until the deleted rows are vacuumed from the indexes, an index
> scan must read all the index entries for the deleted tuples, and
> visit the heap to determine that they are not visible.  Does a
> manual run of ANALYZE without a VACUUM change the stats much for
> you, or are you running VACUUM ANALYZE?
>
> -Kevin
>

The autovacuum is running correctly, so the deleted rows are being
removed. All I'm doing is an ANALYZE, not VACUUM ANALYZE.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ogden 2010-09-21 17:32:01 Query much faster with enable_seqscan=0
Previous Message Joe Miller 2010-09-21 13:33:00 Re: Auto ANALYZE criteria