flowable / flowable/flowable-engine

Unnecessary and very slow update statement in oracle upgrade script !?

Open
#3,646 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
7h 8m
Merged PRs (30d)
2

Description

**unnecessary update statement in oracle upgrade script**

Hi we want to migrate from Activiti 5.15 to flowable 6.60.
Our tables are stored in an oracle 19 database and some of them are really big, e.g. ACT_HI_VARINST has 600 Mio rows.

In the script flowable.oracle.upgradestep.6010.to.6100.history.sql i see that there is an add cloumn with default value followed by an update of this column to the same default value, and I am wondering if it makes sense?
See:
https://github.com/flowable/flowable-engine/blob/8c476e8834915291bd6d133ecf3528b9b99e6032/modules/flowable-engine/src/main/resources/org/flowable/db/upgrade/flowable.oracle.upgradestep.6010.to.6100.history.sql#L6

The statement `alter table ACT_HI_ACTINST add REV_ INTEGER default 1` is really fast (only a few Milliseconds), buit the update will take several hours. The reason, as far as i undesratnd , is that in the first statement oracle stores only a metadate and does not write all rows.
Is there any special reason why you force the writing of all rows with the `update` statement?

**Expected behavior**
A fast as possible execution of migration db scripts.

**Additional context**
currently we are using activiti 5.15, we want to migrate to flowable 6.60, The database version is Oracle 19.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.