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: Why index Scan in this case ?

Re: Why index Scan in this case ?

From: Matthias Hoys <idmwarpzone_NOSPAM__at_yahoo.com>
Date: Wed, 2 Nov 2005 16:20:53 +0100
Message-ID: <4368d957$0$4214$ba620e4c@news.skynet.be>

"Js" <jagjeet_malhi_at_hotmail.com> wrote in message news:1130943499.743375.14190_at_o13g2000cwo.googlegroups.com...
> Thanks Peter,
>
> Actually I could not clear my question. I know this is because
> histograms are not there.
>
> analyze table t compute statistics
> is equal to
> analyze table t compute statistics for table for all tables for all
> indexes.
>
> Whey you tried with histograms it pick the full table scan.
>
>
> My question was : I analyzed table and index.
>
> Oracle knows the number of rows. -- Table Stats
> Oracle knows the distinct no of columns - Index Stats
>
> Oracle know that this table has 5792 records and 1 distinct value.
>
> Anyhow index usage for all the would be costly.
>
> Then y still oracle is choosing index scan ?

Oracle doesn't know how many columns there are with object_type = 'TABLE'. That's why you need histograms, to calculate the distribution of data within that column. Received on Wed Nov 02 2005 - 09:20:53 CST

Original text of this message

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