improve speed update sequences when run post migrate script
Description
Environment
Attachments
Activity
Carlos Ruiz May 9, 2020 at 5:26 PM
Triaged by
The issue is solved in Postgresql - it's worthy if something similar can be implemented in Oracle.
Keeping the ticket open for this reason.
Carlos Ruiz August 26, 2019 at 3:59 PMEdited
Commit implement performance improvement for postgresql.
We would need something similar for oracle.
Carlos Ruiz December 15, 2016 at 11:58 AM
thanks , I think integrating your patch seems easy
I think is about to change the lines 137:142 or the oracle script, and lines 118:120 of postgresql script with your suggested 5 commands.

Hiep Lq December 15, 2016 at 10:54 AM
in normal case i don't have issue with it. but i just move to use project id central.
I set my project to get id from 6000000, that why script take a lot of time to run (i can't wait it)
Carlos Ruiz December 15, 2016 at 9:43 AM
, have you had problem with the speed of 03_update_sequences.sql.
It is intended to be a very sporadic operation, perhaps one time at initial migration in case direct inserts were done without using nextidfunc.
And retrieving native sequences usually is ran on memory, so is must be a very fast operation.
post migrate script "03_update_sequences.sql" use nextval to move current seq to current max value of table_id
it can't acceptable when you move native seq to [project central id |wiki.idempiere.org/en/Centralized_ID_Management#For_Projects_with_Distributed_Developers]
my idea use one step by change value INCREMENT BY to decrease step to call nextval to 1
I attack my script to do it here, hope have time to merger with 03_update_sequences.sql