Rick Hillegas created DERBY-6522:
------------------------------------
Summary: Make LOB handling by MERGE statement more efficient.
Key: DERBY-6522
URL: https://issues.apache.org/jira/browse/DERBY-6522
Project: Derby
Issue Type: Improvement
Components: SQL
Affects Versions: 10.11.0.0
Reporter: Rick Hillegas
As a result of patch derby-3155-44-aa-lobsInTriggers.diff, LOBs may be
materialized before being buffered up for use by the WHEN [ NOT ] MATCHED
clauses of MERGE statements. This can happen, for instance, when a LOB is not
referenced by any clause in the MERGE statement but the LOB is still needed by
a trigger fired by one of the statement's INSERT, UPDATE, or DELETE actions.
For some applications, this will be inefficient. It may be possible to improve
efficiency by leaving the driving left join open until the WHEN [ NOT ] MATCHED
clauses have been processed and then just buffer up LOB references rather than
materialized LOBs. However, that may cause other problems. In particular, we
would need to make sure that LOBs which are referenced multiple times (say by
more than one DELETE trigger) still work; we have had problems with LOBs which
end up being read more than once by a statement.
--
This message was sent by Atlassian JIRA
(v6.2#6252)