-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable cache for oracle sequences (#446)
* disable cache for oracle sequences * another fix to oracle scripts * update changelog [ci-skip] * initialize seq * drop and recreate nflow_workflow_action_id_seq * Tune Oracle SQL scripts * Tune oracle update script still more * Update CHANGELOG.md Co-authored-by: Esa Puttonen <[email protected]>
- Loading branch information
Showing
3 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
nflow-engine/src/main/resources/scripts/db/update-7.2.5-x/oracle.update.ddl.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
alter sequence nflow_executor_id_seq nocache | ||
/ | ||
|
||
alter sequence nflow_workflow_id_seq nocache | ||
/ | ||
|
||
drop sequence nflow_workflow_action_id_seq | ||
/ | ||
|
||
declare | ||
id_with_slack number; | ||
begin | ||
select nvl(max(id),0) + 1000 into id_with_slack from nflow_workflow_action; | ||
execute immediate 'create sequence nflow_workflow_action_id_seq start with ' || id_with_slack || ' nocache'; | ||
end; | ||
/ | ||
|
||
create or replace trigger nflow_workflow_action_insert | ||
before insert on nflow_workflow_action | ||
for each row | ||
declare | ||
begin | ||
:new.id := nflow_workflow_action_id_seq.nextval; | ||
end; | ||
/ |