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 -> Query CBO Cost - Hints

Query CBO Cost - Hints

From: Anurag Varma <avoracle_at_gmail.com>
Date: 8 Apr 2005 14:09:31 -0700
Message-ID: <1112994571.790991.305540@l41g2000cwc.googlegroups.com>

There is a debate I'm having on metalink about a case where OP had the following problem:

Oracle 9.2.0.5, CBO used with very low value of optimizer_index_cost_adj (1):

delete from table; shows a cost of 81 with a bitmap index being used.

delete /*+ index(table btree_idx) */ from table; shows a cost of 1 with a
b*tree index being used.

Now I understand that the optimizer_index_cost_adj value is too low .. and that a full table scan might be better.

However, I'm of the opinion that the CBO itself should have accounted for the b*tree index in its costs and since it appears to be of a lower cost, the b*tree index should have been used in the first instance (i.e. without hinting).

To which a subsequent poster refers me to the following post on Tom's site:

http://asktom.oracle.com/pls/ask/f?p=4950:8:5440244398791053756::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:313416745628

I agree to Tom's points there. However, I'm not sure if my deduction is flawed even after reading the thread.

  If yes .. then can anyone create a test case which shows this (assuming
  the test case result is not as a result of a bug .. )

Since I've not seen Tom replying to metalink threads .. I thought he might
rely here (Thanks Tom if you do reply)...

Thanks,

Anurag Received on Fri Apr 08 2005 - 16:09:31 CDT

Original text of this message

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