Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6522

Make LOB handling by MERGE statement more efficient.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.11.1.1
    • None
    • SQL
    • None
    • Normal
    • Performance

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhillegas Richard N. Hillegas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: