From: Kris Jurka <books@ejurka.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: John T. Dow <john@johntdow.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: refreshRow is slow
Date: Sat, 25 Dec 2010 17:32:25 -0500 (EST)
Message-ID: <alpine.BSO.2.00.1012251718240.29778@leary.csoft.net> (raw)
In-Reply-To: <4B511515.6090809@opencloud.com>
References: <201001160014.o0G0EJWO035231@web2.nidhog.com>
<4B511515.6090809@opencloud.com>
On Sat, 16 Jan 2010, Oliver Jowett wrote:
> John T. Dow wrote:
>
>> Certainly that piece of code can be made more efficient. One query ought to
>> be able to return all the primary keys.
>
> It's not the PKs it is after (it's already worked those out earlier), it's
> the column names to select to populate the rest of the resultset.
>
> But yes, it could be more efficient. We'd need a static String[]
> Field.getColumnNames(Connection,Field[]) method or similar.
>
I've adjusted the fetching of all of the ResultSetMetaData attributes to
happen in one query for the entire ResultSet instead of one attribute of
one column at a time. I've adjusted the updateable ResultSet code to use
ResultSetMetaData to take advantage of this, so refreshRow should be much
faster now.
Kris Jurka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, oliver@opencloud.com, john@johntdow.com
Subject: Re: refreshRow is slow
In-Reply-To: <alpine.BSO.2.00.1012251718240.29778@leary.csoft.net>
References: <201001160014.o0G0EJWO035231@web2.nidhog.com> <4B511515.6090809@opencloud.com> <alpine.BSO.2.00.1012251718240.29778@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox