John T. Dow wrote:
> Each row in a postgres database has a unique identifier. I would think that refreshrow could use that to target the specific row to be refreshed.
refreshRow() uses the primary key of the table to synthesize a SELECT to
pick out just the one row, yes. If you explicitly select a column called
"oid" in your query, it'll use that instead of the PK columns.
(I looked at that code and there are a few ways to confuse it. That's
why I want to know what the actual query that's causing problems is.)
> I realize that I only want to refresh one row, and that refreshrow actually uses the fetch size and may get more than one if required. Refreshing many rows using their unique identifiers might not be desirable.
Huh? Fetch size should have no effect on refreshRow() - it should only
be selecting a single row anyway.
Again: What is the actual query being synthesized by refreshRow(), and
have you tried analysing that query to work out why it's slow?
Also, if you just want to do an UPDATE and have the freshly updated data
appear in your resultset, why don't you use the ResultSet update
interface? updateRow() populates the ResultSet row with the data sent to
the backend as part of the update.
In response to
pgsql-jdbc by date
|Next:||From: SJ Kissane||Date: 2010-01-15 01:27:21|
|Subject: Bug in AbstractJdbc2BlobClob|
|Previous:||From: John T. Dow||Date: 2010-01-14 23:59:36|
|Subject: Re: refreshRow is slow|