Revision 20, 489 bytes (checked in by robert, 10 years ago)

lower the limit to 10000 pages for table to track

1 create or replace function otools.collect_table_growth()
2 returns void   
3 as $$
4     insert into otools.table_growth (table_owner, schema_name, table_name, actual_size, growth_size, sum_flag, capture_time)
5     select pg_get_userbyid(c.relowner) AS table_owner, n.nspname AS schema_name, c.relname AS table_name, pg_total_relation_size(c.oid), 0, 0, current_date
6     from pg_class c JOIN pg_namespace n ON (c.relnamespace=n.oid) where relkind = 'r' and reltuples > 10000;
7 $$ language sql;
Note: See TracBrowser for help on using the browser.