From: | decibel <decibel(at)decibel(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Stats for inheritance trees |
Date: | 2010-01-06 07:45:06 |
Message-ID: | 39AD2D76-7AF6-45F8-A545-5FF9D578398A@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Dec 29, 2009, at 6:29 PM, Tom Lane wrote:
> * when a tabstat message comes in, increment changes_since_analyze by
> the sum of t_tuples_inserted + t_tuples_updated + t_tuples_deleted;
>
> * when an analyze report message comes in, reset changes_since_analyze
> to zero.
If that's being added, could we extend the concept to also keep a reltuples_delta column (name suggestions welcome!) that is = reltuples_delta + t_tuples_inserted - t_tuples_deleted, and then set reltuples_delta back to 0 after an analyze (or anything else that would reset reltuples)? That means you could use reltuples + reltuples_delta as a fairly accurate row count.
--
Jim C. Nasby, Database Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net
From | Date | Subject | |
---|---|---|---|
Next Message | decibel | 2010-01-06 07:52:55 | Re: pg_migrator issues |
Previous Message | Jaime Casanova | 2010-01-06 06:33:03 | Re: Type modifiers for DOMAIN |