RE: dbms_stats.gather_table_stats

From: Igor Neyman <>
Date: Fri, 5 Sep 2008 15:14:38 -0400
Message-ID: <>

Are you sure, that your first command collects statistics for separate partitions (and not just for the whole table)? Did you check partitions statistics?

-----Original Message-----

[] On Behalf Of
Sent: Friday, September 05, 2008 3:01 PM To:
Subject: dbms_stats.gather_table_stats

Hi everybody:

I am running oracle Once a week we have a analyze process run to gather stats on all the tables in the schema via commands like this one exec
dbms_stats.gather_table_stats( 'schema', 'table', null, 25, degree=>8, cascade=>true );

Some of the tables are partitioned and we have 6 or 7 historical partitions which are not being updated anymore so I thought I would save time by restricting this command to only last two partitions:

exec dbms_stats.gather_table_stats( 'owner', 'table', 'part1', 25, degree=>8, cascade=>true ); exec dbms_stats.gather_table_stats( 'owner', 'table', 'part2', 25, degree=>8, cascade=>true );

The partitions are roughly the same size. The indices are globally partitioned. The first command (analyze the whole table) took 25 minutes. Last two command combined - 27 min. Considering that there are 5 more patitions in the table, the math does not add up. What am I missing?

thank you

Gene Gurevich


-- Received on Fri Sep 05 2008 - 14:14:38 CDT

Original text of this message