Re: Date range for pg_stat_all_tables? - Mailing list pgsql-admin

From Albe Laurenz
Subject Re: Date range for pg_stat_all_tables?
Date
Msg-id D960CB61B694CF459DCFB4B0128514C208AF06AF@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Date range for pg_stat_all_tables?  (Ronit Allen <ronit.allen@gmail.com>)
Responses Re: Date range for pg_stat_all_tables?
List 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


pgsql-admin by date:

Previous
From: Ronit Allen
Date:
Subject: Date range for pg_stat_all_tables?
Next
From: Aaron Bono
Date:
Subject: Postgre Eating Up Too Much RAM