Native UUIDs in PostgreSQL
Most of your users will never notice but it can help on databases that need it. He lists some advantages on the google code page:
Database Size – Using a native UUID type on a table that also has an index on the uuid column saves 47% space. This is good because there is less data on disk and in memory. Which really matters if you have potentially hundred of millions of records. The native UUID type uses 16 bytes of storage whereas a ascii uuid column uses 38 bytes.
Consistency – The native UUID type only accepts UUIDs that are well formatted. Of course you can also do this with a constraint check, but having a native type with a fixed format is more elegant in my opinion.
Transparent – Nobody is going to notice the difference. Because of the implicit typecasting you can use UUIDs as if they are ascii values.
You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.