Re: Slow performance updating CLOB data

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Slow performance updating CLOB data
Дата
Msg-id nmi4rk$ki0$1@ger.gmane.org
обсуждение исходный текст
Ответ на R: Slow performance updating CLOB data  (Nicola Zanaga <NZanaga@efsw.it>)
Ответы Re: Slow performance updating CLOB data  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Re: Slow performance updating CLOB data  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Список pgsql-jdbc
Nicola Zanaga schrieb am 18.07.2016 um 10:13:
> Here a snippet:
>
>         st= connection.createStatement(ResultSet.*/TYPE_FORWARD_ONLY/*, ResultSet.*/CONCUR_UPDATABLE/*);
>         ResultSet resultSet= st.executeQuery("SELECT id, data FROM TestClob1 WHERE id = 1 ");
>
>
>         resultSet.next();
>         resultSet.updateCharacterStream(2, *new*StringReader("hello"), "hello".length());
>         resultSet.updateRow();
>         resultSet.close();

Did you try resultSet.updateString(2, "hello") instead?

> Most of the time is spent in method PgResultSet.isUpdateable  because the table has a primary key but doesn't have a
"oid"column. 
> So the code tries to get primary keys from the query, using getMetaData().getPrimaryKeys.

But in order to run an UPDATE on the table, the driver will need to retrieve the PK, there is no way around that.
I guess using updateString() won't change that

Thomas

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

Предыдущее
От: Nicola Zanaga
Дата:
Сообщение: R: Slow performance updating CLOB data
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: Slow performance updating CLOB data