i am thinking of using autonumber in my table which is more likely to grow over time. but i am also concerned that what if the records get too much? is there is any other fields to use instead of autonumber? is uniqueidentifier a better option? i have a bit of discussion with my colleague about this matter.
any help is appreciatedIf you use BigInt as your ID number, you cannot exhaust the number of records in a lifetime, not even in a couple of hundred lifetimes.
This is how many records you can accomodate with BigInt as identifier:
9,223,372,036,854,775,807
9 Quintillion
9,223 Quadrillion
9,223,372 Trillion
etc...
You get the picture. I do not recommend using 'uniqueidentifier' as they take doubly more place than BigInt.
BigInt = 8 bytes
uniqueidentifier = 16 bytes
There are situations where 'uniqueidentifier' may come in handy, but more seldom than often.
No comments:
Post a Comment