Check out JobNimbus - CRM for Contractors and Service Professionals.
Performance benchmarks for ODBC vs. Oracle, MySql, SQL Server .NET Providers
I did a simple benchmark for the 3 main databases (Oracle 11g, MySQL 5.1, SQL Server 2008) to see how using ODBC compares to using their native providers in .NET for all database access. To keep things on an even playing field, all 3 databases were run on the same machine, with the exact same database name, table name, and schema. Database authenticaton was used by all databases.
This is a follow-up to the Performance benchmarks for LINQ vs. SqlDataReader, DataSet post where I tested different data access methods. Here I just used DataReaders for all database access because it is the fastest and put all access on even footing. I have put up the code here (which was adapted from the previous benchmarks) so you can see my methodology:
Here are the results:
******************************
Run : 1
******************************
Oracle ODBC: 4,822 ms
Oracle .NET: 1,158 ms
MySQL ODBC: 1,800 ms
MySQL .NET: 1,356 ms
SQL Server ODBC: 955 ms
SQL Server .NET: 470 ms
******************************
Run : 2
******************************
Oracle ODBC: 4,786 ms
Oracle .NET: 994 ms
MySQL ODBC: 1,914 ms
MySQL .NET: 1,216 ms
SQL Server ODBC: 888 ms
SQL Server .NET: 517 ms
******************************
Run : 3
******************************
Oracle ODBC: 4,623 ms
Oracle .NET: 981 ms
MySQL ODBC: 1,914 ms
MySQL .NET: 1,213 ms
SQL Server ODBC: 926 ms
SQL Server .NET: 457 ms
-------------------------------------------------------------------
Data Access Type Run 1 Run 2 Run 3 Average
-------------------------------------------------------------------
Oracle ODBC 4,822 4,786 4,623 4,743
Oracle .NET 1,158 994 981 1,044
MySQL ODBC 1,800 1,914 1,914 1,876
MySQL .NET 1,356 1,216 1,213 1,261
SQL Server ODBC 955 888 926 923
SQL Server .NET 470 517 457 481
-------------------------------------------------------------------
Oracle .NET Provider
-------------------------------------------------------------------
454.31% faster than Oracle ODBC
-------------------------------------------------------------------
MySQL .NET Provider
-------------------------------------------------------------------
148.77% faster than MySQL ODBC
-------------------------------------------------------------------
SQL Server .NET Provider
-------------------------------------------------------------------
191.89% faster than SQL Server ODBC
As you can see, using the .NET Native Provider for the database you are connecting to makes a HUGE difference. I avoid ODBC for any high performance system because its convenience in multiple database connections can't cancel out its severe performance limitations on many systems.
Popular Articles
Last viewed:
- Installing Visual Studio 2008 Server Pack 1 (SP1)
- Fixing Relative Paths in C# ASP.NET When Using Url Rewriting
- Visual C++ - Release compile - warning C4653 - Optimizations inconsistent
- Get Index Fragmentation Percentage for all Tables in SQL Server Database
- ASP.NET CSS Highlight TextBox on Focus
- C# Download File with Progress Bar
Similar
- Connecting to SQL Server, Oracle, and MySQL with Database or Windows Authentication
- SQL Server Database Project and Database Source Control
- Get the list of ODBC data source names programatically using C#
- MySQL Administrator - Can't see with Remote Desktop session connecting to Multiple Monitor Workstation
- C# Store/Retrieve File in Database Image Field using ODBC

Recent comments
15 hours 38 min ago
2 days 11 hours ago
3 days 14 hours ago
4 weeks 6 days ago
4 weeks 6 days ago
5 weeks 6 days ago
6 weeks 2 hours ago
6 weeks 1 day ago
8 weeks 6 days ago
10 weeks 1 day ago