Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you decide the length of GUID field?
Message
From
06/08/2008 09:18:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/08/2008 02:49:39
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01336497
Message ID:
01336842
Views:
21
>HI,
>
>>
>>GUIDs are useful if users are not permanently connected. GUIDs are supposed to give unique values (based, in part, on the fact that each network card has a unique serial number). However, GUIDs are fairly long - 16 bytes.
>
>I prefer char type surrogated key. So, if I make it like an GUID in a char format, it will be 32 chars. I am worry that will affects performance in the long run....

Of course it will affect performance. Why not use the 16-char GUID, and then have a function that converts to a readable form when you need it?

Also, do you really need GUIDs? If all users are connected at the same time, a 4-byte Integer should also work. But you may still consider GUIDs if you plan to upsize your system later (to include disconnected users).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform