Hi All,
I have a table with two columns.One is SEX and other is CODE.In column SEX i have only two distinct values,'M','F'.Total no of records in the table is 1 lakh 50 thousands
Since i use this column, SEX in my where condition, i indexed it and generated histograms with 2 buckets.
select count(*) from mytabs where sex='M';
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=91 Card=1 Bytes=1)
1 0 SORT (AGGREGATE)
2 1 INDEX (FAST FULL SCAN) OF 'MYTABS_IDX' (NON-UNIQUE) (Cos
t=91 Card=39653 Bytes=39653)
i am not seeing the point why index is created..coz in most of the cases Sex M Or F will equally be divided..or rather M will silightly be more than F in any organization...
So when data is/rather will be spread across more then 20% of blocks in a table..it will do an FTS ( which is much efficient )
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Bookmarks