Re: JAVA vs PERL : PERL wins to postgreSQL - Mailing list pgsql-jdbc

From Robert J. Sanford, Jr.
Subject Re: JAVA vs PERL : PERL wins to postgreSQL
Date
Msg-id HOEFIONAHHKFEFENBMNOGEEPCCAA.rsanford@nolimitsystems.com
Whole thread Raw
In response to JAVA vs PERL : PERL wins to postgreSQL  (andy <andy@exkom.co.za>)
List pgsql-jdbc
i have several questions about the benchmark run that all come
down to one basic question - was the benchmark fair?

1) were you trying to test the performance of the languages or
   were you trying to test the performance of the drivers? if
   you are trying to test _languages_ then what you should do
   is to use a common driver. if you are coding on a windoze
   platform you can set up the odbc driver and have both perl
   and java connect to the db through the same driver. i don't
   know how 'fair' that test is though because java will still
   have the overhead of jdbc:odbc bridge.

2) assuming that you are trying to test differences in drivers,
   what did the tests consist of? were the insertions done in
   the context of a transaction or outside of one? a test that
   i ran that inserted 250+ records in one table and then 4500
   in another test through perl and odbc ran at about 1:25 out
   of a transaction and 0:30 inside of a transaction. there's
   a big difference.

3) did both of the drivers used have the same settings? did
   you make sure that the autocommit states were identical?

4) did you take into account ONLY the amount of time needed to
   insert the data or were the times listed for assembling,
   inserting, and reporting results?

5) did you do a "warm up" session so that the code was in the
   same state as if it had been running on the server or were
   both run from cold starts? would that make a difference in
   terms of loading up all the drivers, etc.?

6) did the benchmark only use one connection for the entire
   test or were multiple connections used? if multiple, did
   you optimize your code like you would for a production
   setting where you would be using connection pooling?

rjsjr

> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of andy
> Sent: Monday, September 03, 2001 12:47 AM
> To: pgsql-jdbc@postgresql.org
> Subject: [JDBC] JAVA vs PERL : PERL wins to postgreSQL
>
>
> Hi,
>
> I ran a few bench marks on JAVA writing to a postgreSQL
> table using  and
> found that for the same number of records added to the table as a
> similar PERL routine the following results :
>      PERL 39 seconds : JAVA 45 Seconds.
> In a similar experiment where PERL and JAVA did treir output to the
> screen and not to a table,
>
> JAVA took 3 seconds and PERL 310 Seconds.
> My conclusion is that the database driver to postgreSQL is still far
> from efficient in the JAVA implementation.
>
> Both tests were run on the same computer.
>
> I would appreciate your comments and suggestions.
> Andy Sewell
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>


pgsql-jdbc by date:

Previous
From: Anders Bengtsson
Date:
Subject: Re: JAVA vs PERL : PERL wins to postgreSQL
Next
From: Bryan Field-Elliot
Date:
Subject: PGpoint and PGcircle both sql type 1111?