Performance Benchmarks: DataDirect ODBC vs. Native Database Interface

Some developers don’t use ODBC because they believe its benefits come at the expense of application performance. In an independent benchmark study, database expert Ken North compared the performance of programming natively to the database interface with using an ODBC interface and driver from DataDirect.

Key findings:

  • DataDirect wire protocol drivers outperform native programming by a wide margin.
  • DataDirect performance was better than native in seven of ten tests.
  • There is no ODBC performance penalty when using DataDirect drivers.

Oracle 9i- Native vs ODBC Wire Protocol

In this sample benchmark, the smaller the bar, the better the performance. For example, “Select 3” shows that DataDirect outperforms native by 80%. In six of the ten, ODBC with wire protocol is clearly faster (often by 40% to 80%.)

Advantages of Using ODBC / Wire Protocol Drivers

Disadvantages of Native Programming

Faster than native programming
Using DataDirect wire protocol drivers results in faster application performance than coding to the native database API.

This is possible because DataDirect drivers include many performance features such as network optimization. For example, DataDirect uses compressed data packets that are allowed by the architecture of our drivers, but not by the native interface the database uses. This means significantly fewer packets are transmitted across the wire, resulting in better application performance.

In addition, DataDirect drivers don’t use database client libraries to communicate with the database as other drivers do, instead accessing it directly through the database’s wire protocol. This eliminates the extra processing that occurs within the performance-inhibiting client libraries.

Coding to the native API of the database actually results in slower application performance than when using the ODBC interface and DataDirect wire protocol ODBC drivers.

More flexible
Developers can write one set of code to the ODBC standard interface to connect to multiple databases.

DataDirect ODBC drivers also offer many interoperability features such as SQL Leveling that make coding to different databases even easier.

Requires unique, non-portable code in the language of each database the application requires. In a heterogeneous database environment, this can add considerably to development costs.

Improves developer productivity
Developers can write one set of code to the ODBC standard interface to connect to multiple databases. They don’t have to learn the intricate details of each database’s native interface.

ODBC has other programming advantages:

  • Provides full access to native database functions via ODBC pass-through or escape sequences.
  • Works well on all databases, including Oracle, DB2, Sybase, and MySQL, not just Microsoft SQL Server.
  • Can be used on a variety of platforms: Windows, HP-UX, Linux, AIX and Solaris, as well as a variety of 32-bit and 64-bit chipset architectures

Coding to the native interface of each database is time consuming.

Lowers support costs
Using ODBC makes it easy to extend the database coverage of your application. When you want to support a new database, you just need to get a wire protocol driver for the new database.

And because DataDirect wire protocol drivers don’t require database client libraries, you don’t have to update these libraries every time there’s a change to the database version.

You need different experts for each database you want to code to.

Improves performance and maintenance of existing applications
Switching your application to ODBC/wire protocol drivers can result in a 25-50% performance improvement, and sometimes even more.

It also lowers your support costs because you don’t have to update your applications every time there are changes to the underlying databases.

There are few options to improve the performance of a maturing application. Generally this has to come via a technical innovation in software or hardware.