dbms_stats.gather_table_stats [message #361501] |
Wed, 26 November 2008 12:17 |
pdhayan@qwest.com
Messages: 6 Registered: August 2008
|
Junior Member |
|
|
Hi,
I've a partitioned table with a global PK. I use dbms_stats.gather_table_stats pack to gather stats on the the table. I gather stats at partition level by passing partition name to partname parameter. Right now the granularity is set to ALL, I'm planning to change it to 'PARTITION'.
Will there be any impact due to this? I access the table most of the time by the PK. since I'm changing the valueto 'PARTITION' will there be any perf difference?
Thanks in advance for your advice....
|
|
|
|
Re: dbms_stats.gather_table_stats [message #361511 is a reply to message #361501] |
Wed, 26 November 2008 12:50 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
>> I access the table most of the time by the PK
That might help with what you are trying to do. If the query knows the partition from which the data is to be fetched, global stats is of not much use. But as you said, that is "most of the time".
For the "rest of the time", if there is no global stats, Oracle CBO will assume one by deriving values from partition level stats and may get very confused.
|
|
|