TOAD is one of the most widely used editors to interact with the databases like Oracle, SQL Server etc. No prizes for guessing why is it the most popular editor - It provides so many fancy things to play around with the queries. The look and feel is really cool. There are utilities like Formatter Plus (to format your ugly looking queries), Code Xpert (to do a complete post-mortem of your PL/SQL code), SQL Optimizer (to guide you through your heavy weight queries) , then there are ready made code snippets to boost up your coding speed, fancy looking explain plans (perfectly readable) which can be seen animating.ER Diagram, Code Road Map, FTP, File comparison are other some of the very useful utilities.
I think, enough of praise. Now the bug!
I ran a very simple statement and tried to count the number of rows in the result set. The size of the result set can be seen at two different places. Marked in red in the image below:
Oracle is returning 798 rows. But, when I did a "Record Count" from the right-click menu of the "Data Grid", I got 804 as the count.
To further check this, I directly ran a SELECT COUNT ... query, and I got the count as 798. This clearly indicates that TOAD is being erroneous while counting the records.Inspite of being one of the finest SQL editors in the business, TOAD has its own set of limitations. Who doesn't have them by the way?
As told in my previous post, we are curerntly in the process of migrating some of our applications from Oracle 9i to 10g. And to my surprise, we have found so many issues with the Oracle 10g itself. Oracle 10g SQL optimizer has a lot of bugs in itself. We got back to Oracle Support team with our pain points. They admitted the issues and are working on it. For the time being they suggested us a work-around:
ALTER SESSION SET "OPTIMIZER_FEATURES_ENABLE" = "9.2.0";
Yes, as said by my manager, this is really ironical that we will be using 9i optimizer in 10g but it is what it is. :)
I was laughing out loud at this. Oracle has its 11i release set to launch and they have bugs with 10g optimizer. But never mind, that's the life of us - software engineers. So just chill !