vendredi 8 mai 2015

SQL Tuning : Using Hints


  • Good hints vs Bad hints
    • good hint : ordered
  • Automatic Query Rewrite with Hint
    • use_concat
select ename from emp
where
    deptno=10
or
   sal< 5000
or
   job='CLERK'

The first option is to create a bitmap index on the 3 columns, the second option is to use use_concat hint :

select /*+ use_concat */ ename from emp
where
    deptno=10
or
   sal< 5000
or
   job='CLERK'

Aucun commentaire:

Enregistrer un commentaire