Oracle Logbook

May 19, 2011

How to be sure if your hint has been used

Filed under: Uncategorized — Helio Dias @ 9:36 pm

Comparing your execution plan is not the best way to do it, since could be just a coincidence.

Actually you must set the trace event 10132 , at the end of the trace file you´ll see if your hints have errors or not.

May 2, 2011


Filed under: Uncategorized — Helio Dias @ 8:00 pm

It´s a wonderful simple idea,

select * from (select cpf,valor from CM.TAB_DIRF order by 2 desc) where rownum=1

On the above query one might think that the ordering cost will become prohibitive

IT ISN`T thanks to COUNT STOPKEY Oracle is pretty clever to pick up just one value (as the outside filter is 1)

Then Oracle just check if the new values is higher or not than the previous one.

The bottom line is , there is NO ordering at all.

Create a free website or blog at