Index Scan Methods




--====================================================
Important Index Scan Types
--====================================================

1. INDEX RANGE SCAN
2. INDEX UNIQUE SCAN
3. FULL SCAN
4. FULL SCAN (Min/Max)
--5. FULL FAST SCAN
--6. INDEX SKIP SCAN

------------ LAB ------------
--====================================================
--B-Tree / Noraml / Simple  Index  SCAN TYPE:-  INDEX RANGE SCAN
--====================================================


select * from XXEMP_TL

Create Index XX_BTREE_EMPNO_INDX ON XXEMP_TL(EMPNO)

Example :- 

explain plan into sys.plan_table$ for
select * from XXEMP_TL where EMPNO = 7499

select * from table(dbms_xplan.display('sys.plan_table$'));



--====================================================
--B-Tree / Noraml / Simple  Index  SCAN TYPE:-  INDEX UNIQUE SCAN
--====================================================


Create UNIQUE Index XX_UNIQUE_MOBILENO_INDX ON XXEMP_TL(MOBILENO)

Example :- 

explain plan into sys.plan_table$ for
select COUNT(*) from XXEMP_TL --where MOBILENO = 2123212541

select * from table(dbms_xplan.display('sys.plan_table$'));




--====================================================
--B-Tree / Noraml / Simple  Index  SCAN TYPE:-  INDEX FULL SCAN
--====================================================

Create Index XX_BTREE_SAL_INDX ON XXEMP_TL(SAL)

--DROP INDEX XX_BTREE_SAL_INDX

Example :- 

explain plan into sys.plan_table$ for
select SUM(SAL) from XXEMP_TL

select * from table(dbms_xplan.display('sys.plan_table$'));




--====================================================
--B-Tree / Noraml / Simple  Index  SCAN TYPE:-  INDEX FULL SCAN (Min/Max)
--====================================================

explain plan into sys.plan_table$ for
select MIN(SAL) from XXEMP_TL

select * from table(dbms_xplan.display('sys.plan_table$'));







explain plan into sys.plan_table$ for
select MAX(SAL) from XXEMP_TL ;

select * from table(dbms_xplan.display('sys.plan_table$'));




--====================================================

select * from USER_INDEXES where table_name = 'XXEMP_TL'

select * from USER_IND_COLUMNS  where table_name = 'XXEMP_TL'

--====================================================

 


Comments

Popular posts from this blog

E-Text Report In Fusion | Types of E-Text reports

Supplier API's

How to pass default Parameter in cursor