Changeset 16

Show
Ignore:
Timestamp:
07/01/08 18:14:16 (6 years ago)
Author:
robert
Message:

since we only track tables, include thier indexes into the size counts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/table_growth/otools.collect_table_growth.sql

    r15 r16  
    33as $$ 
    44    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_relation_size(c.oid), 0, 0, current_date  
     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  
    66    from pg_class c JOIN pg_namespace n ON (c.relnamespace=n.oid) where relkind = 'r' and reltuples > 25000; 
    77$$ language sql;