Populating a surrogate key in parallel inserts
We have a number of large tables that we want to load in parallel. During load, a surrogate key is to be populated from a sequence. In serial mode we do bulk fetch and bulk insert via plsql, and there we maintain a cache of sequence numbers to fill the key (via a function call that manages the sequence-number-cache). Now we want to load in parallel using insert ... select. Just referencing sequence.nextval once for each row is not a good performer. Triggers do not perform all that well either. So actually, I would like to still use the function-based