Microsoft’s .NET Oracle driver vs Oracle’s own .NET driver – Drastic performance differences
Until now we’ve been happily using Microsoft’s .NET Oracle driver to connect our applications to the database. But recently we started encountering some strange performance problems. We were able to pinpoint the problem to the DataReader and its Read-method. For some reason, the first call to that method was taking really long even though the DataReader was empty. In some queries the call took around 300 milliseconds and sometimes as long as five seconds.
It was obvious only after we tried it: Switching from Microsoft’s driver to Oracle’s .NET driver brought us dramatic performance benefits. Where before our slowest queries took about six seconds to complete, they were now completing in less than 100 ms. Even the queries which we had considered fast saw drastic changes, dropping from 150 ms to 25 ms.
Previously we had two different test environments. Using the Microsoft’s Oracle driver one of our environments was performing OK and the other one was extremely slow (hence the question on StackOverflow). After changing our application to use the Oracle’s driver instead, our slow environment is now fast. And the previously OK working environment is also much faster than before. What is better, we’re getting consistent performance between both of our environments.
Is Microsoft’s .NET Oracle driver broken? Or is there a catch on using the Oracle’s driver? We’re now going through all the things which are different between the two drivers to get a better picture on the subject. If you have experience on this topic I would be glad to hear from them.