2. Analytical Function
Ranking
RANK, DENSE_RANK, CUME_DIST, PERCENT_RANK,
NTILE, ROW_NUMBER
LAG and LEAD
FIRST_VALUE and LAST_VALUE
FIRST and LAST
Windowing
Reporting
Most of aggregate function can be user (MAX, MIN, AVG,
SUM, COUNT)
21. Rewrite Query – IN vs EXISTS
Not In and Not Exists will produces exactly the same result if
there is no NULL record in the sub-query. Extra predicate can be
added for NULL value checking.
Not Exists is more efficient because when Oracle found 1 record
that satisfied the condition in the Sub-Query, it will move to the
next record of Main Query and also Oracle will be able to use
index in Sub-Query.
In case of Not In, Oracle has to scan whole population of SubQuery before it move to the next record of Main Query. It will
takes more IO and because of implicit NVL function in the
predicate, Oracle will not be able to use index access.
Not In will be translated as ((COL != VALUE_1) AND (COL !=
VALUE_2) AND (COL != VALUE_3) … AND (COL !=
VALUE_X))
22. Log Mining
Collection of procedure to read an examine redo log or
archive log
Database Supplemental Log Data should be turn on.