Re: Why is JDBC so slow? - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Why is JDBC so slow?
Date
Msg-id 29075.1062530558@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why is JDBC so slow?  (Fernando Nasser <fnasser@redhat.com>)
Responses Re: Why is JDBC so slow?  (Joseph Shraibman <jks@selectacast.net>)
Re: Why is JDBC so slow?  (Paul Thomas <paul@tmsl.demon.co.uk>)
List pgsql-jdbc
Fernando Nasser <fnasser@redhat.com> writes:
> So the psql program reads data and spits it out (to /dev/null, which is fast)
> every row it reads.

> The JDBC driver has to store all these rows in memory and wait for you
> to tell it what you want to do with it.

But libpq also stores the entire query result in memory.  That doesn't
seem like a reason for JDBC to be slower.

One thing I'd wonder about is the overall startup overhead for Java.
What's the relative time to do a trivial "select 2+2" each way?

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Fernando Nasser
Date:
Subject: Re: Why is JDBC so slow?
Next
From: Joseph Shraibman
Date:
Subject: Re: Why is JDBC so slow?