Basic Query - Index Skip Scan
Hi ,
I have a very basic Query .
I am using Autotrace to check the Plan for the following Query
Table Definition :
------------------------------------
create table tb_emp(
sextype varchar2(1),
empid number
);
Table Values
-----------------------------------------------
insert into tb_emp values('F',98);
insert into tb_emp values('F',100);
insert into tb_emp values('F',102);
insert into tb_emp values('F',104);
insert into tb_emp values('M',101);
insert into tb_emp values('M',103);
insert into tb_emp values('M',105);
commit;
Index:
-----------------------------------------------------------------------------
create index EMP_SEXTYPE_EMP_IDX on tb_emp(SEXTYPE,empid);
Query:
--------------------------------------------------------------------------------------------------------------
select * from tb_emp where empid=101;
---------------------------------------------------------------------------------------------------------------
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=0 Card=1 Bytes=15)
1 0 INDEX (FULL SCAN) OF 'EMP_SEXTYPE_EMP_IDX' (INDEX) (Cost=0 Card=1 Bytes=15)
As per b14211 this should result in a Skip index Scan ,
Any pointer to what am i missing or the other parameters that might be impacting the execution plan .
Thanks and Regards,
Ashish .