When explain plans lie

djberg96 on 2004-10-28T17:59:53

A better explain plan always means better performance, right? Wrong. Consider the PARALLEL hint in Oracle. I can get a great looking explain plan with something absurd like this:

select /*+ parallel(table,32,32) */
But, if you time this, the performance sucks rocks because there aren't nearly that many striped disks, and the hint ends up working against you. This is why you should always ask for information (i.e. number of cpu's, striping, etc) about the hardware that the Oracle server is actually sitting on.