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: CBO picks wrong plan after analyze. FIRST_ROWS hint is workaround. ALL_ROWS causes wrong plan

Re: CBO picks wrong plan after analyze. FIRST_ROWS hint is workaround. ALL_ROWS causes wrong plan

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 22 Sep 2006 17:11:46 -0700
Message-ID: <1158970304.76856@bubbleator.drizzle.com>


oracle10_at_gmail.com wrote:

> Sybrand Bakker wrote:

>> On 21 Sep 2006 10:58:34 -0700, oracle10_at_gmail.com wrote:
>>
>>> Are there cases when following Oracle Recommendation by frequent
>>> ANALYZE/stats gathering causes CBO to go astray?
>> Yes. That is one of the reasons why you should dbms_stats instead of
>> ANALYZE. Dbms_stats can save the old 'good' statistics to a stats
>> table, so you can easily restore them.
>> Also many people warn against frequent analysis.
>> IMO, I think frequent analysis, without saving the old statistics
>> (which seems to be the norm in my office) is just asking for trouble.
>>
>> --
>> Sybrand Bakker, Senior Oracle DBA
> 
> Thanks for advise against frequent analysis.  I heard that CBO in 8i
> was inferior to RBO. Is that your experience?
> Thanks

Depends on the 8i second and third decimals. With 8.1.7.4 I'd use CBO and hint RULE if required.

-- 
Daniel Morgan
Puget Sound Oracle Users Group
Received on Fri Sep 22 2006 - 19:11:46 CDT

Original text of this message

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