Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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?
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…

610 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