?
Solved

Performance comparison ODBC vs. OLE DB

Posted on 2001-08-26
8
Medium Priority
?
906 Views
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 ...?

Thanx..
0
Comment
Question by:AAB
[X]
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
8 Comments
 
LVL 49

Expert Comment

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

  http://www.experts-exchange.com/jsp/qShow.jsp?ta=mfc&qid=20162032

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
0
 
LVL 32

Expert Comment

by:jhance
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.
0
 
LVL 32

Expert Comment

by:jhance
ID: 6427040
Didn't you ask this same Q somewhere else also?
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 49

Accepted Solution

by:
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
0
 
LVL 3

Expert Comment

by:kulina
ID: 6431904
0
 
LVL 1

Expert Comment

by:mupchu777
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.  
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6480720
Hi AAB,
Do you have any additional questions?  Do any comments need clarification?

-- Dan
0
 
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…

764 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