I’m using this technique also with Oracle, Sql Server, DB2 and H2. Postgresql driver is about 5-10 times slower.
I can change strategy for postgres, but I don’t think is good to issue a query like “UPDATE table SET clob = ‘value’ WHERE key = x” if value is more than 10Mb.
So I’m bit confused how to do this operation.
PS: about the cache, in my opinion it’s acceptable cache primary keys, I don’t expect primary keys change so often.
Da: Vladimir Sitnikov [mailto:sitnikov.vladimir@gmail.com]
Inviato: lunedì 18 luglio 2016 13:48
A: Dave Cramer; Nicola Zanaga
Cc: Thomas Kellerer; pgsql-jdbc@postgresql.org
Oggetto: Re: [JDBC] Slow performance updating CLOB data
Dave>Well all drivers have to do something similar. Not all result sets are updatable. What do other drivers do ?
Technically speaking, pgjdbc could cache the names of primary keys for a given table.
It would be useful at least in two places:
However, as of now no such cache exists in pgjdbc.
The second issue is the backend does not send notifications on DDL changes. Thus the cache can easily get out of sync when java thinks there's a column named A, and in reality the column was dropped long ago.