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: How is possible that avg_data_blocks_per_key = 0 even with fresh statistics ?

Re: How is possible that avg_data_blocks_per_key = 0 even with fresh statistics ?

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: Mon, 10 Dec 2007 05:42:20 -0800 (PST)
Message-ID: <5849259c-c57c-4592-b222-d9f49a107049@v4g2000hsf.googlegroups.com>


On Dec 10, 7:54 am, Robert Klemme <shortcut..._at_googlemail.com> wrote:
> On Dec 9, 10:53 pm, hpuxrac <johnbhur..._at_sbcglobal.net> wrote:

snip

> I don't understand why then you write this, which I believe is the bit
> that David refers to:
>
> > The optimizer at times can get confused with tables and indexes that
> > were analyzed when they were empty ( num_rows =0 etc ) but now have
> > data loaded. As best I understand it almost any plan the optimizer
> > might come up relating how to access an empty table may look similar
> > so it can pick the wrong index, use full scan, a strange type of index
> > access etc.
>
> Maybe you intended to say that the optimizer comes up with bad plans
> if it *thinks* the table is empty, which would fit the phenomenon much
> better.

Well this is going off course again but since you brought it back up.

No actually what I intended to say was exactly what I said. The optimizer may or may not come up with bad plans if the statistics say that a table is empty when it is no longer in that condition. I am confident that test cases can be created either way showing reasonable and at times unreasonable execution plans.

> But I believe the real issue here is why *does* the optimizer
> think it is empty in the first place although the table was analyzed
> when not empty?

That seems to be what the OP is claiming.

> > The OP is stating that he has a system where the table was analyzed
> > and it was not empty at the time but values of 0 appear in the index
> > stats. Are you not understanding that part?
>
> Exactly! This is the crucial bit. Maybe your wording was too
> ambiguous.

??? Received on Mon Dec 10 2007 - 07:42:20 CST

Original text of this message

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