R: Slow performance updating CLOB data - Mailing list pgsql-jdbc

From Nicola Zanaga
Subject R: Slow performance updating CLOB data
Date
Msg-id 47856758BAE4794A9EC4FCA2E63FC85E370594BC@exchange.intranet.efsw.it
Whole thread Raw
In response to Re: Slow performance updating CLOB data  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Responses Re: Slow performance updating CLOB data
Re: Slow performance updating CLOB data
List pgsql-jdbc

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:

1) updateable resultset

2) return generated keys

 

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.

 

Vladimir

pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Slow performance updating CLOB data
Next
From: Dave Cramer
Date:
Subject: Re: Slow performance updating CLOB data