Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Analyze vs dbms_stats

Re: Analyze vs dbms_stats

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Thu, 06 Jul 2006 13:58:47 GMT
Message-Id: <pan.2006.07.06.13.58.47.517198@sbcglobal.net>


On Thu, 06 Jul 2006 03:18:19 -0700, News wrote:

> someone to confirm that :
>
> - analyze is more suited to RBO and both wont be supported any more ?

RBO means "Rule Based Optimizer". Its main principle is "if there is an index, use it". It uses rules, based on index existence. Where exactly does analyze fit in that picture? What do you need statistics for when you use RULE based optimizer?

>
> - in 10g one should use dbms_stats package instead ? stats generated
> are more accurate and plans could be different ?
>
> - what's exactly the difference between the 2 methods ?

The difference is described in the Note:114671.1. One important difference is that analyze doesn't collect global statistics for partitioned tables. Also, DBMS_STATS is able to parallelize its workload, while analyze is not. DBMS_STATS also calls "ANALYZE", as described in the note mentioned above.

-- 
http://www.mgogala.com
Received on Thu Jul 06 2006 - 08:58:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US