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: Explain Plan and Cardinality

Re: Explain Plan and Cardinality

From: abdul <abdul996_at_gmail.com>
Date: 15 Sep 2005 00:40:31 -0700
Message-ID: <1126770031.159402.305980@f14g2000cwb.googlegroups.com>

schonlinner_at_yahoo.com wrote:
> Hi,
>
> Database: Oracle 10g (10.1.0.4) on HP/UX PA Risc 64 bit.
>
> When doing an explain plan on a sql select statement I can see the
> cardinality in different steps of the plan.
>
> >From the Oracle documentation I've read that the cardinality is how
> many rows Oracle expects from this step. So if there is something like
> "TABLE ACCESS BY LOCAL INDEX ROWID" with cardinality 25 displayed by
> explain plan, then I thought that Oracle thinks that it retrieves round
> about 25 rows from this step.
>
> Now sometimes the cardinality is totally wrong: I know that a specific
> step returns 200000 rows, but the cardinality in Oracle displays only
> 2-5 rows.
>
> I thought it may be the statistics which is wrong. But the tables have
> been analyzed (by the default analyze job which is automatically
> configured in 10g on our system).
>
> Is there anything which I can do to give Oracle more information so it
> guesses the cardinality better? Why is it "wrong"?
>
> Regards,
> Alex
Received on Thu Sep 15 2005 - 02:40:31 CDT

Original text of this message

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