Rick Hillegas wrote:
David Goulden wrote:
Good day,
We would like to update our derby version from 10.4.1.3 to 10.5.1.1
due to
the newer version's much improved performance with large CLOBS.
However our
client is very conservative and would like to be sure the upgrade won't
cause any issues.
Can anyone tell me what changes are made to a database when derby
performs
an upgrade? What is the best way to verify that the upgrade hasn't
caused
any changes to the data?
Many thanks,
David
Hi David,
The 10.4 -> 10.5 upgrade changes some of the system metadata on disk
but does not alter any user data. However, if you yourself rewrite
your CLOBs after the upgrade, the on disk format will change. That is
because 10.5 adds some extra header information to on disk CLOBs in
order to deliver the performance improvements you want. I don't
believe that you will see the performance improvements until you
update your CLOBs yourself.
David and Rick,
What Rick says is correct, except for the last sentence. You will see
the general performance improvements for streaming and positioning,
amongst other things.
What you won't see until you write the CLOBs with the 10.5 format, is
the optimizations for operations involving the character length of the
CLOB. For small CLOBs this isn't that much of a deal, but if we're
talking about CLOBs ranging in size from tens of MB and upwards it will
strain your system as the data is decoded to obtain the length.
If your client is very conservative and uses large CLOBs, I would
suggest to wait for the next maintenance release. The reason I say this,
is DERBY-4245 [1]. I don't know if you can tell whether you're going to
be affected by this bug or not.
The community is discussing the next maintenance release, and I think
the current proposal is to release it in July/August.
You say you would like to upgrade due to the improved performance with
large CLOBs. Are these improvements you have experienced yourself, or
based on feedback from the community/others?
Regards,
--
Kristian
[1] https://issues.apache.org/jira/browse/DERBY-4245
You might try the following experiment:
1) Copy your 10.4 database to a temporary location.
2) Hard-upgrade that copy.
3) Rewrite a couple of your CLOBs by, for example, using a vacuous
update statement:
update myTable set clobColumn = clobColumn where keyColumn = ?
4) Verify that you are seeing better performance for the CLOBs you
have rewritten. Also verify that your application still functions
properly on those CLOBs.
Kristian, who improved CLOBs for 10.5, may want to comment further.
Hope this helps,
-Rick