DBMS_STATS Vs ANALYZE
Let us take this example..
DBMS_STATS.GATHER_TABLE_STATS('INVENTORY','SALES', METHOD_OPT => 'FOR COLUMNS SIZE 1 ERDAT');
What is FOR COLUMNS SIZE 1 ?. What does it mean the number 1?
I was reading this link ..
From this link, DBMS_STATS is good when we compare to ANALYZE statment due to below points.
1. DBMS_STATS has parallel statistics collection
2. DBMS_STATS gathering statistics only when existing statistics are stale
3. gathering partition-level and subpartition-level statistics
4. GATHER_SYSTEM_STATS is not available in ANALYZE
My question is, does DBMS_STATS gather statistics
when existing statistics are stale??
does ANALYZE command generate Historgrams?
You need to do some reading, I would suggest you invest a couple of bucks in your career.
Oracle Tuning, The Definitive Reference by Donald K. Burleson
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Don't use ANALYZE
Read the documentation, which answers all your questions for free
>>What is FOR COLUMNS SIZE 1 ?. What does it mean the number 1?
It means "Do not generate histograms".
Click Here to Expand Forum to Full Width