RE: [coldbox:2413] Re: UUIDGenerator (Was External Model Mappings)

When using MS SQL Server I always place GUIDs in uniqueidentifier
columns. If for no other reason than the storage size.

A varchar 36 takes 36 bytes to store. A uniqueidentifier only take 16.
That can add up quick when you have a lot of guids laying around.

Heck, a uniqueidentifier is smaller than varchar, but an int is smaller
than both of them. (2 bytes) I used to work with a SQL Server database
that was about 30 Gigs. I added up all the GUIDs we had in there by
taking all the uniqueidentifier columns in each table and index times
the number of records in that table/index. We could have saved
something like 12 Gigs of space if we had used integers for our primary
keys. Oh well.

Using a uniqueidentifier column also lets the database enforce the data
type better since a varchar column would let you put "xyz" in it.

I've also assumed SQL server is somehow faster at using
uniqueidentifier's instead of varchars. I have absolutely no proof of
this though.

~Brad