Posts

Showing posts from April, 2020

Index Scan Methods

Image
--==================================================== 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 --====================================...

Hierarchical Queries OR Connect by Queries

Image
For better understanding please go to the YouTube channel. https://www.youtube.com/oracleshooter Hierarchical Queries Or Connect by Query in Oracle Connect by Queries :- In its simplest form a hierarchical query needs a definition of how each child relates to its parent. This is defined using the  CONNECT BY .. PRIOR  clause, which defines how the current row (child) relates to a prior row (parent). In addition, the START WITH clause can be used to define the root node(s) of the hierarchy. Hierarchical queries come with operators, pseudocolumns and functions to help make sense of the hierarchy. LEVEL  : The position in the hierarchy of the current row in relation to the root node. CONNECT_BY_ROOT  : Returns the root node(s) associated with the current row. SYS_CONNECT_BY_PATH  : Returns a delimited breadcrumb from root to the current row. CONNECT_BY_ISLEAF  : Indicates if the current row is a leaf node. ORDER SIBLINGS BY  :...