We have primary keys defined throughout our system as GUIDs(uniqueidentifiers) in SQL Server. Some of this data is synchronized to low memory handheld devices. The handheld device runs a custom written .NET application.
The problem is that the GUIDs are taking up a huge amount of space because of their size(16 bytes each). A row in a table may have a primary GUID key as well as four foreign key GUIDs. Multiply this by many rows and you quickly eat up a lot of resources on a handheld.
Since long integer types take only 8 bytes, is it possible to convert the 16 byte HEX GUID to long integer or some other type that could possibly cut the memory usage in half?
It would not appear converting it to byte array has any advantage because it still would end up as 16 bytes right?
I'm sure there is some common method of doing this?
TIA!
J
The problem is that the GUIDs are taking up a huge amount of space because of their size(16 bytes each). A row in a table may have a primary GUID key as well as four foreign key GUIDs. Multiply this by many rows and you quickly eat up a lot of resources on a handheld.
Since long integer types take only 8 bytes, is it possible to convert the 16 byte HEX GUID to long integer or some other type that could possibly cut the memory usage in half?
It would not appear converting it to byte array has any advantage because it still would end up as 16 bytes right?
I'm sure there is some common method of doing this?
TIA!
J