Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [JDBC] Performance comparison to psql.

From: Arie Ozarov <aozarov(at)hi5.com>
Date: Tue Feb 05 2008 - 18:09:07 EST


Would it be better than to group inserts using standard statement (not prepared - or does it really matter) this way: insert into T values (set1), (set2),..,(setN); ?

Any reason for a select statement to be 3 times slower?

When is it planned to include the copy support in the official version?

Thanks!
Arie.

On 2/5/08 2:31 PM, "Kris Jurka" <books@ejurka.com> wrote:

>
>
> 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. JDBC
> batch execution groups things together to reduce the number of network
> round trips, but it still has to send each insert as an individual request
> to the server.
>
>> Any performance improvement in postgresql-8.2-507.jdbc4.jar?
>> 

>
> No.
>
>> Is the copy operation much more optimized than inserts (and if so when/will
>> the driver support it)?
>> 

>
> Yes, copy is significantly faster than insert. If you'd like, construct a
> psql test case that does 100,000 individual inserts and you'll see it's
> not just a JDBC driver/libpq difference.
>
> Copy support is available using this patched driver, but it has not been
> integrated into the official version yet.
>
> http://kato.iki.fi/sw/db/postgresql/jdbc/copy/
>
> Kris Jurka
>
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend Received on Tue Feb 5 18:15:30 2008

This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:43:40 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library