1

When a GUID is stored as a string such as:

741ecf77-9c92-4435-8e6b-85975bd13452

Is there any one part that is more unique on the same computer? Obviously I could remove the hyphens but if I wanted to cut down on the length of the GUID (and lose some uniqueness) can I just pick the first ten characters or the last or ??

1 Answers1

0

Here are 10 GUIDs generated using online generator

400465a7-6533-4cd0-bfec-6e74ac75a830
db849123-e4a2-4883-b489-2e5b8f7f0b73
644aec02-cc95-4fcf-a792-4e57b2509f69
78a9f2db-0328-4dc4-9c08-41cc51e342ca
ad04a2dd-1661-4c6f-8ac0-7593e1255402
3ee1362c-d55e-451b-8617-353389802ba8
95816697-ce79-4425-a3aa-fe4d3d6824a7
a0b52b4f-165f-4284-96d9-a46b32e53e6d
23ee49d5-c689-4807-ab1b-f837de3b3914
5987747d-7910-405c-987a-e7d45a2cb1de

I am not seeing much in the way of a pattern

If GUIDs are too long, you are better off generating unique id using the identity feature than try to extract a useful subset of a GUID since your subset is no longer guaranteed unique.

However, there are multiple methods of, generating GUIDs and I can tell you from experience that there were some obvious visible patterns in the old method. I still could not recommend substringing the guid showing such a pattern either as it will still result in duplicate values

Community
  • 1
  • 1
Gary Walker
  • 8,831
  • 3
  • 19
  • 41