Re: Help writing a query to predict auto analyze

From: Gordon Shannon <gordo169(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Help writing a query to predict auto analyze
Date: 2010-05-19 22:02:51
Message-ID: 28614875.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2010-05-19 22:11:35 Re: Help writing a query to predict auto analyze
Previous Message Steve Atkins 2010-05-19 20:09:32 Re: object tracking