Performance comparison ODBC vs. OLE DB

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..
AABAsked:
Who is Participating?
 
DanRollinsConnect With a Mentor Commented:
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
 
DanRollinsCommented:
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
 
jhanceCommented:
>>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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
jhanceCommented:
Didn't you ask this same Q somewhere else also?
0
 
kulinaCommented:
0
 
mupchu777Commented:
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
 
DanRollinsCommented:
Hi AAB,
Do you have any additional questions?  Do any comments need clarification?

-- Dan
0
 
Roshan DavisCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.