Primary key - VARBINARY or BLOB or VARCHAR for the primary key UUID

I use UUID as primary key in one of the tables.
What are the pros and cons of having this field as varchar / varbinary / blob?

+3
source share
1 answer

The difference between textual and binary UUIDs is a significant number of bytes - 16 for binary representation versus 30+ for text - so the binary path is the way to go. I would choose VARBINARY over BLOB - if only because VARBINARY is a newer type (and, based on the background of SQL Server, I know that VARBINARY can be stored in a string).

+5
source

Source: https://habr.com/ru/post/1759268/


All Articles