Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在其中一个表中使用 UUID 作为主键。 将此字段用作 varchar/varbinary/blob 的优点是什么?
基于文本和基于二进制的 UUID 之间的区别在于大量字节 - 二进制表示为 16 字节,而文本为 30+ - 所以二进制是要走的路。我会选择 VARBINARY 而不是 BLOB - 如果只是因为 VARBINARY 是较新的类型(并且来自 SQL Server 背景,我知道 VARBINARY可以存储在行内)。