Register Login

HANA Sequence NEXTVAL is not incremental automatically

Updated May 18, 2018

Hi SAP Experts,

While calling nextvals parallelly (Multi-threads) the Sequence.NEXTVAL does not get incremented automatically

Please help me to resolve this issue


Comments

  • 13 Oct 2016 2:49 pm Abhijeet Mudgal Best Answer

    The issue you are facing is because while calling nextvals parallelly the sequence is not cached, therefore the sequence expects that first thread cached the sequence as cache size from master and other threads are using cached one. But now there are several threads which are trying to cache the sequence from master.

    Please do the following:

    • Use sequence without cache option.
    • Use in-memory sequence creating with 'RESET BY' option for performance.
    • CREATE SEQUENCE <name> RESET BY ..

×