Re: db stats vs table stats

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: db stats vs table stats
Date: 2007-02-23 22:06:34
Message-ID: 200702231506.34413.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oops, typo: I reversed the inequality. I've corrected it below.

On Friday February 23 2007 2:02 pm, Ed L. wrote:
> I've been periodically collecting the stats stored in
> pg_statio_all_tables and pg_stat_database for ~30 different
> clusters, and have noticed a curiosity.
>
> I would have thought that for a given period, the change in
> pg_stat_database.blks_read would be >= the sum of the changes
> in pg_statio_user_tables.heap_blks_read +
> pg_statio_user_tables.idx_blks_read +
> pg_statio_user_tables.toast_blks_read +
> pg_statio_user_tables.tidx_blks_read.
>
> In short, the total would be >= heap + idx + toast + idx for
> user tables.
>
> It does not appear that way. The table-level IO stats appear
> to be typically 1-2 orders of magnitude larger than the
> db-level stats. Can anyone explain that?
>
> TIA.
> Ed

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2007-02-23 22:08:38 Re: complex referential integrity constraints
Previous Message Joshua D. Drake 2007-02-23 22:02:15 Re: [HACKERS] 5 Weeks till feature freeze or (do you know where your patch is?)