R: Slow performance updating CLOB data

From: Nicola Zanaga <NZanaga(at)efsw(dot)it>
To: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Thomas Kellerer <spam_eater(at)gmx(dot)net>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: R: Slow performance updating CLOB data
Date: 2016-07-18 12:28:52
Message-ID: 47856758BAE4794A9EC4FCA2E63FC85E370594BC@exchange.intranet.efsw.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)vladimir(at)gmail(dot)com]
Inviato: lunedì 18 luglio 2016 13:48
A: Dave Cramer; Nicola Zanaga
Cc: Thomas Kellerer; pgsql-jdbc(at)postgresql(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2016-07-18 12:38:57 Re: Slow performance updating CLOB data
Previous Message Vladimir Sitnikov 2016-07-18 11:48:09 Re: Slow performance updating CLOB data