Performance comparison ODBC vs. OLE DB

Posted on 2001-08-26
Medium Priority
Last Modified: 2013-11-25
Hi.. All..
Pleaze for all experts in DB if you can help in ... i want to know the Performance difference between
ODBC vs. OLE DB in :
i. Various types of recordset.
ii. Various types of database - SQL 7, 2000, Oracle.
iii. Different data types, integer, numeric, string, blob.

So If know about this subject, Pleaze help me, and I need, if there resource exist about this subject,
pleaze provide me ... and How can make the comparison performance programatically ...?

Question by:AAB
LVL 49

Expert Comment

ID: 6425993
xu2000 put some timing stats in this Q:  


He had heard that OLEDB should be faster, but his own tests showed that ODBC recordsets were faster.

My thought is that at some point it's the same thing -- the client sends an SQL query string to the server and then processes the returned data.

The throughput bottleneck will *not* be code that wraps that process -- that is lost in the noise on modern computers.  The bottleneck will be network latency and data transport overhead.  Named Pipes with the DB Server on the local PC will be fastest.  Everything else will be slower.

Better to look for performance gains by minimizing the amount of data that goes across the transport.  Use stored procedures when doing so will prevent some data being shuttled back-and-forth.

I think the decision between ODBC and OLE DB boils down to what you find easiest to work with.  OLE DB can be a pain because of all of those BSTRs that need to be converted to CString.  That tips the balance to using simple CRecordsets with an ODBC connection.

Now... Is Oracle faster than Ms SQL?  That depends upon whose press release you read.  I'd be very surprised to find more than 1% difference in performance for most common operations.  But I do admit the possiblility that in some specific rare, borderline situations one performs enough better than another to make a difference.

-- Dan
LVL 32

Expert Comment

ID: 6426745
>>Now... Is Oracle faster than Ms SQL?  That depends upon whose press release you read

Not only that but it also depends on the particular problem you try to test.  Both have their own strengths.  But getting objective benchmark results for either is quite difficult as neither vendor want to permit any bad news from being published about their products.
LVL 32

Expert Comment

ID: 6427040
Didn't you ask this same Q somewhere else also?

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 49

Accepted Solution

DanRollins earned 800 total points
ID: 6427146
I think AAB is spreading points around in both MFC and C++ to attract the more/better responses.  I'm all for it, as long as he eventually awards the points in both sections.

-- Dan

Expert Comment

ID: 6431904

Expert Comment

ID: 6434011
I agree with most of the above but it also depends on how you implement your solution.  Using OLEDB consumer templates eases the problem of BSTR's as the templates bind to native data types (TCHARs etc).  Which can help speed.  Also I'm not sure if this is implied but, ADO and OLEDB are different interfaces.  ADO is a wrapper architecture that sits on top of OLEDB.  OLEDB has it's own api that rivals ODBC in terms of performance.  

All in all it really boils down to which technology you are more comfotable developing to.  The performance on each is relatively close.  ADO is the slowest of the bunch, but is the easiest to code to.  The ODBC API can be fast (if you code to native drivers and don't do translation), as can OLEDB if written properly.  Usually the best answer is really based on ones technical skill rather than performance of a technology.  I've seen my share of applications written with ODBC and OLEDB/ADO that run slower than DAO due to poor design and poor skill with those technologies.  
LVL 49

Expert Comment

ID: 6480720
Do you have any additional questions?  Do any comments need clarification?

-- Dan
LVL 23

Expert Comment

by:Roshan Davis
ID: 9528442
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: DanRollins

Please leave any comments here within the next seven days.


Roshan Davis
EE Cleanup Volunteer

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question