Quote:
Originally posted by chrisrlong
The trick is then to pick a table with enough rows that you can notice the difference yet not more rows than fit in the cache. Otherwise, you will introduce I/O issues which will likely hide the CASE benefits.
Actually, I disagree with your testing methodology. If you want to compare the raw speed of DECODE vs. CASE, it would actally be more consitent to NOT select data from the database. Introducing the database into the test brings inconsistent results because of the way the database may be tuned/sized.