
Originally Posted by
gurbirbhatia
hi
for optimizer mode-'choose' to have current statistics for tables and indexes which of the two is best ' analyze table (compute/estimate) or dbms_stats.gather_table_stats' whether analyze table (compute/estimate ) gather the statistics for optimizer mode 'choose'.The cost of executing the statement is same in 'plan_table'
i am working in 7.3.4 , 8.1.7 ,9.2
guide me for 7.3.4 , 8.1.7 ,9.2
thanks
DBMS_STATS package can gather global statistics at multiple levels as specified by the granularity parameter.
ANALYZE command collects statistics only at the lowest level.
Oracle recommends to use DBMS_STATS mainly to collect optimizer statistics in 8i and 9i. For 8i and below use analyze.
Remember to monitor the table to keep the stats upto date.
"What is past is PROLOGUE"