Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GUID for a primary key?
Message
From
01/08/2021 15:40:07
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
01/08/2021 06:04:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01681922
Message ID:
01681984
Views:
63
>>As it spans only 8 bytes, it allows more keys to fit in the bTree page leaf, making all index using steps faster.... Justin Case reminds us, if you doubt original vfp docs...

- Windows GUID is 16 bytes binary, so INT/BIGINT Identity would always win on size; and

- IME PK at the client end is mostly for backend updates and maybe a FK for other tables, not so much for math or display...

I am concerned with VFP not always handling field or var casting correctly for C/S. VFPA has fixed most of it, but I don't recall bigint so definitely something to test carefully... it may even turn out that something like Dragan's N(14,0) is most efficient/compatible if it requires less conversion despite consuming more field width in the RV/CA cursor. When I get a moment, I'll check it out!

If you only ever append and never update records in your RV or CA, the Identity PK field isn't used at all at the client end- so I wonder whether it could be left out of the RV or CA altogether, and problem solved! ;-)
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Reply
Map
View

Click here to load this message in the networking platform