Re: Date range for pg_stat_all_tables?

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Ronit Allen *EXTERN*" <ronit(dot)allen(at)gmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Date range for pg_stat_all_tables?
Date: 2012-11-13 08:54:26
Message-ID: D960CB61B694CF459DCFB4B0128514C208AF06AF@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ronit Allen wrote:
> I have the following query on pg_stat_all_tables to look at updates,
inserts, and deletes:
>
> SELECT relname, n_tup_ins, n_tup_upd, n_tup_del FROM
pg_stat_all_tables;
>
> How can I add a date range to the WHERE clause to show data from a
specified date range?
>
> I don't see anything in the table or in possible joins that will
provide dates.
>
> Thanks for any assistance that can be provided.

If you want that, you will have to take regular snapshots
of the table (e.g. with a cron job).
Then you can calculate differences.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Aaron Bono 2012-11-13 22:12:07 Postgre Eating Up Too Much RAM
Previous Message Ronit Allen 2012-11-12 22:54:17 Date range for pg_stat_all_tables?