Re: refreshRow is slow

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: refreshRow is slow
Дата
Msg-id alpine.BSO.2.00.1012251718240.29778@leary.csoft.net
обсуждение исходный текст
Ответ на Re: refreshRow is slow  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc

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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: 9.0 and pg_stat_activity.application_name
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Status of setQueryTimeout