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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Number 1 gripe about CBO: 0 <Cardinality< 1 (?????)

Re: Number 1 gripe about CBO: 0 <Cardinality< 1 (?????)

From: <sybrandb_at_hccnet.nl>
Date: Thu, 05 Apr 2007 00:16:46 +0200
Message-ID: <2o8813h4esn8m36h7lq8cga2rkjo2k5d97@4ax.com>


On 4 Apr 2007 14:58:47 -0700, "Kevin Kirkpatrick" <kvnkrkptrck_at_gmail.com> wrote:

>Not trying to pick on you Sybrand, but given the sample database and
>the desired query, what steps should be taken to avoid the atrocious
>plan?

The plan isn't atrocious. The plan is to be expected. You
- force a full table scan on kk_small
- have no join clause between kk_small and kk_big, yet you list them in this order, which is obeyed by CBO.

What else do you expect?

What you see is what you get!
You shouldn't bash Oracle for this!
You have lousy SQL so you get a lousy plan!

-- 


Sybrand Bakker
Senior Oracle DBA
Received on Wed Apr 04 2007 - 17:16:46 CDT

Original text of this message

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