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

Make LOB handling by MERGE statement more efficient.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.11.1.1
    • Fix Version/s: None
    • Component/s: SQL
    • Labels:
      None
    • Urgency:
      Normal
    • Bug behavior facts:
      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

              • Assignee:
                Unassigned
                Reporter:
                rhillegas Richard N. Hillegas
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: