Re: Why is JDBC so slow?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fernando Nasser <fnasser(at)redhat(dot)com>
Cc: Joseph Shraibman <jks(at)selectacast(dot)net>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Why is JDBC so slow?
Date: 2003-09-02 19:22:38
Message-ID: 29075.1062530558@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Fernando Nasser <fnasser(at)redhat(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Joseph Shraibman 2003-09-02 20:24:32 Re: Why is JDBC so slow?
Previous Message Fernando Nasser 2003-09-02 18:41:47 Re: Why is JDBC so slow?