Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

gather table stats

user13364377Mar 27 2012 — edited Apr 13 2012
Hi All,

DB version:10.2.0.4
OS:Aix 6.1

I want to gather table stats for a table since the query which uses this table is running slow. Also I noticed that this table is using full table scan and it was last analyzed 2 months back.

I am planning to execute the below query for gathering the stats. The table has 50 million records.
COUNT(*)
----------
51364617

I expect this gonna take a long time if I execute the query Like below.


EXEC DBMS_STATS.gather_table_stats('schema_name', 'table_name');

My doubts specified below.

1. can i use the estimate_percent parameter also for gathering the stats ?

2. how much percentage should I specify for the parameter estimate_percent?

3. what difference will it make if I use the estimate_percent parameter?

Thanks in advance

Edited by: user13364377 on Mar 27, 2012 1:28 PM
This post has been answered by AdamMartin on Mar 27 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2012
Added on Mar 27 2012
5 comments
2,925 views