3 ms·
Oh yeah, that makes sense. At least for CHAR(36), but I'm not sure how VARCHAR(36) as given in the article would behave. (Never mind I just looked it up and it
by sp332 9y ago
Oh yeah, that makes sense. At least for CHAR(36), but I'm not sure how VARCHAR(36) as given in the article would behave. (Never mind I just looked it up and it depends on the storage engine - e.g. MEMORY will always allocate the max size.)
- bitJericho 9y agoYou'd be insane to put the primary key in a varchar. Mysql is much faster with static width tables. Your main user table should be static width for all the fields.
- cwyers 9y agoAs opposed to the insanity of storing UUIDs as strings at all? Once you start going into the rabbit hole, you better be prepared to go all the way down.
- bitJericho 9y agoNo doubt. You can store them as INTs! Tho it does get a little hairy dealing with the conversion with MySQL.
- paulryanrogers 9y agoIs this true for all storage engines?
- morgo 9y agoIt is not true for innodb (default). See my other comments in this thread.
- sroussey 9y agoStorage, and index are different. You expand the UTF8 chars into bytes that are then part of a binary tree. It actually gets more interesting when you consider the collations.