Re: Performance comparison to psql. - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Performance comparison to psql.
Date
Msg-id 29358.1202252965@sss.pgh.pa.us
Whole thread Raw
In response to Re: Performance comparison to psql.  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Kris Jurka <books@ejurka.com> writes:
> On Tue, 5 Feb 2008, Arie Ozarov wrote:
>> I understand that JDBC has some overhead (object translation,..) but didn't
>> think the difference would be that big. Do this numbers look correct (any
>> optimization suggestion?)

> The real cost is the protocol level overhead of INSERT vs COPY.

Also, if you were inserting only one row per INSERT command, there's a
significant statement startup/shutdown overhead in the server, even for
a prepared statement.  I don't see any reason to think that these
numbers are JDBC's fault --- it's just a fact of life that COPY is
a lot more efficient than a series of INSERTs.  (If it were not, we'd
hardly even bother having it.)

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Performance comparison to psql.
Next
From: Arie Ozarov
Date:
Subject: Re: Performance comparison to psql.