Re: refreshRow is slow

Поиск
Список
Период
Сортировка
От John T. Dow
Тема Re: refreshRow is slow
Дата
Msg-id 201001201408.o0KE87vp082207@web2.nidhog.com
обсуждение исходный текст
Ответ на Re: refreshRow is slow  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Having decided that refreshRow is going to be too slow sometimes (because it does a query for each column to see if
it'sa primary key), I am for the time being revising my standard application logic to execute the original query again. 

A small complication has developed. There is no guarantee that the rows will be returned in the same order, unless the
orderis explicitly stated in the query. Since my queries are usually user-defined (that is, generated by the
applicationbased on user requests in a non-SQL syntax), I'll have to do something like sort on the primary keys in all
cases.Not necessarily a bad thing to do I suppose. 

But another complication might be confusing to the users. Suppose someone else has added a row. Executing the original
querybrings up more rows than originally. If the user has been scrolling back and forth through the result set,
suddenlya new row will appear. Also possible, someone deletes a row, so it disappears. That is likely to generate a
phonecall to me ("What happened?"). 

It sure would be nice if refreshRow was more efficient in learning which are the primary keys.

John


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

Предыдущее
От: "Donald Fraser"
Дата:
Сообщение: Re: Mapping Java BigDecimal
Следующее
От: "Satish Burnwal (sburnwal)"
Дата:
Сообщение: How to use JDBC to update LargeObject