troubleshooting Question

oracle DBMS_STATS slow

Avatar of stevetheski
stevetheskiFlag for United States of America asked on
Oracle Database
10 Comments1 Solution614 ViewsLast Modified:
All I am wondering why the following gather stats command will take 24hrs on serverA however if i export the table and import it (including indexes) to serverB the stats are collected in 10 minutes.

ServerA and Server are identical vm's on the same metal box

EXECUTE DBMS_STATS.GATHER_TABLE_STATS( 
ownname =>  'SIEBEL', 
tabname => 'S_OPTY',  
block_sample => FALSE,  
method_opt => 'FOR ALL COLUMNS  size SKEWONLY', 
granularity => 'ALL', 
 cascade => FALSE, 
degree => DBMS_STATS.DEFAULT_DEGREE);

also with the above stats should index stats be run also?

Thanks
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros