Altering the size of autopk sequence by 3X default size | Community
Skip to main content
May 9, 2021
Solved

Altering the size of autopk sequence by 3X default size

  • May 9, 2021
  • 1 reply
  • 2238 views

Hello,

 

I want to know how can we alter the size of the dafault autopk, there is something with custom autopk/pksequence, but I am unable to find How to make the autopk size - 3X of its default one?'

 

Thanks.

Komal

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

Autopk sequence goes by rdbms' capability and can be altered as needed, e.g. alter sequence ... maxvalue 99999.

Be mindful of the key's size, default autopk is 32 bit signed integer = ~2B max value.

Changing the field size by adding this attribute could work but sounds like something that would break warranty:

  • <attribute name="id" type="int64"/>

 

Thanks,

-Jon

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
May 9, 2021

Hi,

 

Autopk sequence goes by rdbms' capability and can be altered as needed, e.g. alter sequence ... maxvalue 99999.

Be mindful of the key's size, default autopk is 32 bit signed integer = ~2B max value.

Changing the field size by adding this attribute could work but sounds like something that would break warranty:

  • <attribute name="id" type="int64"/>

 

Thanks,

-Jon

SKomal76Author
May 11, 2021

Hey,

 

Thank you. I think that might help.

 

Komal