MySQL Forums
Forum List  »  Newbie

Re: Charset and Collation Question
Posted by: Dean Richert
Date: November 25, 2014 03:54PM

Thanks for the detailed response again. I read through most of your site (still digesting it!) and making my way through the other sections and implementing the things you recommend (and expanding my general knowledge). I've also been working through the Dubois MySQL 5th edition and it is surprisingly lacking when it comes to an exposition of character set/collations.

Thanks for pointing it out the canonical/exact pattern. That will be extremely useful for me going forward; I am primarily using autocomplets based on user's usernames.

I will have more questions later, but two immediate questions:

1) On your website under the Best Practice section, you say to use utf8mb4 as the default character set, but for the collation, you appear to suggest utf8_unicode_ci. Should I prefer this over utf8mb4_unicode_ci (or maybe utf8mb4_general_ci)?

2)
> I recommend utf8mb4_unicode_ci so that the autocomplete's LIKE will be fast. If you then need to switch to utf8_bin, for a specific test, it will be slow, but perhaps acceptable. (The index is abandoned when you use the "COLLATE xx" clause.)

Is the index abandoned just because you use the "Collate xx" clause in a query, or is it abandoned because a specific collation is used, like utf8mb4_bin? (And if the latter, is the index not used for _bin collations in general?)

Options: ReplyQuote


Subject
Written By
Posted
November 15, 2014 08:55AM
Re: Charset and Collation Question
November 25, 2014 03:54PM


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.