Changeset 47 for trunk/table_growth

Show
Ignore:
Timestamp:
08/18/09 15:17:02 (5 years ago)
Author:
denish
Message:

Fix the bug to summarize daily gorwth size correctly if the prvious day data is not collected

Files:

Legend:

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

    r26 r47  
    99IF to_char(current_date,'dd') <> '01' THEN 
    1010    insert into otools.table_growth (table_owner, schema_name, table_name, actual_size, growth_size, sum_flag, capture_time) 
    11     select a.table_owner, a.schema_name, a.table_name, a.actual_size, a.actual_size-coalesce(b.actual_size,0) AS table_growth, 1, a.capture_time 
     11    select a.table_owner, a.schema_name, a.table_name, a.actual_size, a.actual_size-coalesce(b.actual_size,a.actual_size) AS table_growth, 1, a.capture_time 
    1212    from otools.table_growth a  
    1313        left join otools.table_growth b