Skip to content

Update affected periods only (uni-temp. VT and bi-temp. models) #1

@PhilippSalvisberg

Description

@PhilippSalvisberg

Problem

Updates are minimised in version 0.1.0 on object level. When there are no changed periods after an in-memory-merge then no DML operations are fired. But when DMLs are necessary then the current save_versions procedures changes physically every single record of that object. Technically everything is correct, but the side effects are:

  • unnecessary flashback archive rows for "unchanged" rows
    • makes it difficult to read/analyse/understand
  • more ops, more I/O, more work
    • doesn't make it faster

Solution

Minimise the DML operation. Since the HIST_ID$ is preserved the affected rows are identifiable

Notes

My first attempt to rewrite the MERGE statement with an WHERE clause for the update case failed. Somehow this does not work with a MERGE statement doing insert, update and delete. Either a bug or I do not understand the grammar. So it might be necessary to issue multiple DMLs. However, this need more analysis, but if it is necessary to issue multiple DMLs than that's still better than what we have now.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions