Check Partisioned table stats

Checks partisioned tables satatistics

select substr(table_name,1,20) partitioned_table,
    substr(column_name,1,20) key_column,
    count(*) no_stats,
    count(*)/total_partitions*100 "NO_STAT%"
from (
    select table_name,
        column_name,
        partition_name,
        low_value,
        count(*) over (partition by table_name, column_name)
        total_partitions
    from user_part_col_statistics
    where (table_name,column_name) in
        (select name,column_name
        from user_part_key_columns
        where object_type = 'TABLE')
    )
where low_value is null
    group by table_name,
    column_name,
    total_partitions
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s