|
-
Oracle try to calculate
CARDINALITY = CEIL(<#of_rows>/<#of_dist_keys>)*0.25 = CEIL(570432/4)*KOEF = 4900 (as u wrote)
where KOEF < 1
and this is very low selectivity (IN AVERAGE) for using index.
Oracle Optimazer will think that
1)
in first I should read 1/4 from # of index db blocks and then
2)
~ I should read each table block :
because (only for examlpe)
avg row len = 500
db_block_size = 8K
DB_FILE_MULTYBLOCK_READ_COUT = 8
THEN
probabitity then each DB_FILE_MULTYBLOCK_READ operation has this index key ~ 100%
-----------------------------------------
for full scan table
COST = #of_table_blocks/DB_FILE_MULTYBLOCK_READ_COUT
and this is less then COST when oracle will use index.
-----------------------------------------
ONE NOTE ABOUT ORACLE OPTIMAZER.
IT THINK "IN AVERAGE" , EXEPT SITUATION, WHEN U HAVE
COLUMN'S HISTOGRAMMS.
[Edited by Shestakov on 04-02-2002 at 05:24 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|