develooper Front page | perl.perl5.porters | Postings from February 2000

[comp.lang.java.databases] Re: A tale of several JDBC drivers...

From:
JVromans
Date:
February 21, 2000 04:08
Subject:
[comp.lang.java.databases] Re: A tale of several JDBC drivers...
Message ID:
wl3putqhi6p.fsf@plume.nl.compuware.com
Interesting bottom line. Let's make sure this doesn't happen.

-- Johan

------- Start of forwarded message -------
From: ajmayo@my-deja.com
Newsgroups: comp.lang.java.databases
Subject: Re: A tale of several JDBC drivers...
Date: Mon, 21 Feb 2000 10:48:57 GMT
Organization: Deja.com - Before you buy.
Message-ID: <88r56o$rti$1@nnrp1.deja.com>
References: <87ersn$a68$1@nnrp1.deja.com> <87miq1$hsn$1@nnrp1.deja.com>

In article <87miq1$hsn$1@nnrp1.deja.com>,
  ajmayo@my-deja.com wrote:
> In article <87ersn$a68$1@nnrp1.deja.com>,
>   ajmayo@my-deja.com wrote:
> [some comments about JDBC drivers]

After my disappointment with JDBC, I thought I might check how fast
Perl was using Perl::DBI. This was still going into ODBC but unlike my
simple test program, it prepares and executes the statement, statically
binding the entire row to a set of receiving variables.

Perl::DBI therefore allows you to retrieve an entire array (or hash) in
a single row fetch. And, folks, it is THREE TIMES FASTER! then my ADO
test. In one particularly amazing result, I was able to retrieve 9200
rows from my test table in 15 seconds, writing them to a text file
which at the end of the run was over 17 megabytes. In 15 seconds!.
That, by the way, is with SQL Server also running on my laptop, just as
it was for the JDBC tests.

This means that the *fastest* JDBC driver is *nine* times slower than
Perl (because it was three times slower than ADO). Given that Perl is
not a compiled language, isn't this somewhat shameful?.

I modified the Perl program to copy the received array to another
array, just to give Perl a bit more to do. It could still do all this
extra work and *still* come in neck and neck with my original ADO test -
 and be three times faster than JDBC. Sigh!.

I just can't understand where the performance is going, but as I said
previously I am very suspicious of JNI and the marshalling and
unmarshalling that is going on. I will be profiling this shortly and
let you know what I find.

Perhaps Sun should hire Larry Wall and Tim Bunce to weave their magic
over Java's database connectivity, because it sure needs some help!.




Sent via Deja.com http://www.deja.com/
Before you buy.
------- End of forwarded message -------



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About