Re: JDBC or ODBC?
- From: "Matt Neerincx [MSFT]" <mattn@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 Sep 2005 00:08:03 -0700
I agree with Joe in the most part. From my years of experience with db
systems and apis, the API/interface used to access the database is usually
not the performance bottleneck. The biggest problem is usually the devs
not understanding the most efficient means of doing what they need to do
with the target db. For example they select * from table instead of using
where clause to limit records, etc...
But if it came down to it, I bet I could beat slightly performance of JDBC
code with ODBC code (with alot of extra work). The reason for this is ODBC
is accessable from C++ directly, and you can pass buffers directly from C++
to ODBC API without any conversion. So the data goes straight from my C++
buffer to the driver to the wire and back. With JDBC I have to call some
setter or getter and then this has to translate from UNICODE Java string to
bytes before sending over wire, etc...
But at the end of the day, I will spent 4 weeks writing a bunch of C++ code
to get a few extra milliseconds of perf. I could have written the whole app
in JDBC in a few days, etc... The same argument goes for use VB6 or VB.NET
to SQL, it's very easy to write the code, the perf is not that much worse
than C++, why not use it, etc...
So as the saying goes, don't optimize too early. (G)
--
Matt Neerincx [MSFT]
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Joe Weinstein" <joeNOSPAM@xxxxxxx> wrote in message
news:%23eHmr2YrFHA.1032@xxxxxxxxxxxxxxxxxxxxxxx
>
>
> PJ wrote:
>
>> Thanks for the reply!
>>
>> To clarify, we are choosing between a server that sits on top of Windows
>> 2000 Server that can use ODBC directly with SQL 2000, or a new version of
>> the same server that sits on top of a Java platform and uses JDBC (Type
>> 4). Either way we will not be using a bridge. Our concern is the
>> performance implication directly related to the database access
>> interface. How does JDBC compare with ODBC in this situation? Are there
>> any reliability or performance implications we need to consider? Thanks!
>
> OK, then I don't have the data. The server vendor may... Many other
> factors
> may contribute to which product is overall better. There may be a
> stability
> reason for the vendor making a Java version (besides the ease of making
> one
> such for all platforms).
> joe
>
.
- Prev by Date: Re: How to write UTF-8 encoded XML data to XML column?
- Next by Date: Re: Unable to connect to SQL Server 2000 using JNDI and Tomcat 5.0
- Previous by thread: Re: How to write UTF-8 encoded XML data to XML column?
- Next by thread: Re: Unable to connect to SQL Server 2000 using JNDI and Tomcat 5.0
- Index(es):
Relevant Pages
|