Wednesday, 7 August 2013

Miscellaneous


  1.          Hierarchical Queries
    A Hierarchical query built upon a parent-child relationship with in the same table or view

    SELECT  ename,sal,level
    FROM emp
    CONNECT BY PRIOR empno=mgr
    START WITH ename ='KING';
    2.       Oracle Hints : Effects the explain plan of a  query.
    Optimizer hints can be used with SQL statements to alter execution plans.
    Types:

    Single-table  Eg : INDEX and USE_NL
    Multi-table   Eg : LEADING
    Query-block Eg : STAR_TRANSFORMATION , UNNEST
    Statement Eg : ALL_ROWS

    3.       EXPLAIN PLAN
    The EXPLAIN PLAN statement displays execution plans chosen by the Oracle optimizer for SELECT, UPDATE, INSERT, and DELETE statements. A statement's execution plan is the sequence of operations Oracle performs to run the statement.


                 

No comments:

Post a Comment