I implemented a system that leads to a lot of holes in Postgresql generated sequence values. I just wanted to ask if this can cause some reduction in performance?
If possible please include a reference where I can do further reading thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t worry. There won’t be any influence on performance.
The main reason is that numbers (integer, bigint) are stored with a fixed amount of storage. So there is no differenc in storage or runtime overhead whether an ID holds the value 42 or 38643874638
Also: holes in sequences can not be avoided. As a primary key is just “some value” they don’t matter either.
Storage requirements of integers: http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-INT