Re: Help writing a query to predict auto analyze - Mailing list pgsql-general

From Gordon Shannon
Subject Re: Help writing a query to predict auto analyze
Date
Msg-id 28614875.post@talk.nabble.com
Whole thread Raw
In response to Re: Help writing a query to predict auto analyze  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Help writing a query to predict auto analyze  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-general


alvherre wrote:
>
> Excerpts from Gordon Shannon's message of mié may 19 11:49:45 -0400 2010:
>
>> at: last analysis tuples = pg_class.reltuples ????
>>
>> I'm the least confident about the last one -- tuples as of last analyze.
>> Can anyone confirm or correct these?
>
> In 8.4 it's number of dead + lives tuples that there were in the previous
> analyze.  See pgstat_recv_analyze in src/backend/postmaster/pgstat.c.
> (In 9.0 it's been reworked a bit.)
>
>

I'm sorry, I'm not following you.  Are you saying that "last analysis
tuples" is "number of dead + live tuples from the previous anlyze"?  If so,
that would really confuse me because X would always be 0:

X = lt + dt - at
X = pg_stat_user_tables.n_live_tup + n_dead_tup - (n_live_tup + n_dead_tup)
X = 0

....or is there something else wrong with the formula?

--gordon

--
View this message in context:
http://old.nabble.com/Help-writing-a-query-to-predict-auto-analyze-tp28610247p28614875.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Steve Atkins
Date:
Subject: Re: object tracking
Next
From: Alvaro Herrera
Date:
Subject: Re: Help writing a query to predict auto analyze