Re: JDBC or ODBC?

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
>


.



Relevant Pages

  • Re: Alternative to using DSN to connect to database
    ... you have to use .NET ODBC provider. ... Server is NOT optimized. ... Just because of the Admiistrator thinking DSN is easier for him to control ... > Basically my problem is that the ODBC Connection Manager in Control Panel ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL Server extremely slow
    ... terms of what is meant by a dis-connected ado recordset. ... table in a mdb file could be considered disconnected from the server ... Well, ok, but keep in mind the disk drive is on sql server! ... 10 reocrds from the server via odbc does not produce more ...
    (comp.databases.ms-access)
  • Re: Need ODBC for every front end, or just server?
    ... on the server, and, in response to some other signal ... > to use the ODBC driver is on the workstation, ... >> Do I need the ODBC license and install on every Front End PC, ...
    (microsoft.public.access.externaldata)
  • Linked Servers: Invalid schema
    ... Have you put a trace on the ODBC ... call 'in query analyser)- that gets ... database you are trying to connect to and schema refers to ... >server in Enterprise Manager and I have also used it ...
    (microsoft.public.sqlserver.odbc)
  • Re: ODBC Help!
    ... code on the production server, I determined that the code is hanging on the ... why doesn't ODBC.NET support the Navision interface? ... > Is it a problem with the Navision driver or the ODBC .NET provider? ...
    (microsoft.public.data.odbc)