Thanks Jim,
The info u provided as really usefull. I'll tink about making
my surrogate PK's as integer data type.
Wow! 10 records every sec for 68 years!!! By the time it runs
out of code, may be my son will rewrite it :))
Thanks a lot for the info...
Biju
> Biju,
>
> The Integer data type is a four byte singed binary number with a range of;
>
> -2,147,483,647 to +2,147,483,646
>
> If you make your PK an integer you can just give any new record the next
> number. If you restrict the values to positive only you get 2,147,483,646
> unique positive numbers. If you start the sequence at -2,147,483,647 then
> you get over 4,000,000,000 unique values.
>
> Integers need no conversion so you save on the time it takes to build your
> base 36 numbering system.
>
> Keep in mind though, that if you use only positive numbers then you may run
> out of ids. If the system has 10 records added every second 24 hours a day
> it would only work for 24,855 days or approximately 68 years before it ran
> out of new values.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement