MySQL Forums
Forum List  »  Newbie

Re: GUID field
Posted by: Rick James
Date: November 23, 2010 12:04AM

Yes, VARCHAR(36) would work, but I contend that it is not as good as BINARY(36).

VAR means variable length. That is not necessary since a GUID is fixed length.

CHAR implies a collating sequence. If you are using utf8, the implies each character could be up to 3 bytes; this causes some processing overhead (but not storage overhead, except during certain sorts).

BINARY does no collation, not even case folding.

I prefer BINARY(36) because it avoids collation. If I make sure all data (both in the table, and being used for comparison is always the same case (upper or lower), then I don't need any collation.

Options: ReplyQuote


Subject
Written By
Posted
November 20, 2010 04:34AM
November 21, 2010 12:32PM
November 22, 2010 06:42AM
Re: GUID field
November 23, 2010 12:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.