Histograms..understanding
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)
But when i do the below
select * from mytabs where sex='M'
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=143 Card=25001 Bytes
=75003)
1 0 TABLE ACCESS (FULL) OF 'MYTABS' (Cost=143 Card=25001 Bytes
=75003)
Can any one explain.
regards
anandkl