Re: 9.0 Driver

From: Kris Jurka <books(at)ejurka(dot)com>
To: "John T(dot) Dow" <john(at)johntdow(dot)com>
Cc: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: 9.0 Driver
Date: 2010-08-10 17:56:27
Message-ID: alpine.BSO.2.00.1008101338150.26476@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sun, 8 Aug 2010, John T. Dow wrote:

> There is, I believe, a problem with the JDBC driver in that it gives
> very poor performance doing a refreshRow. The problem is that the driver
> queries the server for every column in the resultset.
>
> I implemented a quick and dirty fix by modifying the driver to (on
> demand) use the labels returned in the resultset.
>
> This solution of course will fail if the original query used an alias
> for a column. Other than that, it seems to be a good solution.
>
> Apparently I am the only one who uses refreshrow, because I reported the
> fact that it was slow in January (and there was a little discussion) but
> when in April I reported my crude solution there was no discussion.

I think it's a combination of factors, few people use refreshRow and fewer
people use it on results with hundreds of columns. Yes, it is slow, but
it isn't abysmal and it's only slow for the first refreshRow execution
on the ResultSet, so subsequent refreshes are fast. As you've stated, the
solution you've implemented is inadequate for the general case, so I'm not
sure what further discussion there should be about it. Is there something
in particular you'd like feedback on?

So yes, it's a known issue, but not a high priority one.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2010-08-10 18:19:28 Re: Concurrency issue in EscapedFunctions
Previous Message Kris Jurka 2010-08-09 18:49:04 Re: [HACKERS] Trouble with COPY IN