Is there any grate performance benefit(s) for setting Collation for mysql database or let the database engine use the default Collation? Thanks.
Asked
Active
Viewed 167 times
0
-
2One does not set the collation for performance purposes. One sets the collation for functionality. – Gordon Linoff Apr 09 '16 at 14:36
-
1Collation settings affect sorting behaviour for example. Performance should not be considered here. – Kamil Gosciminski Apr 09 '16 at 14:37
-
So Collation affects how ORDER BY works? – Want2bExpert Apr 09 '16 at 14:44
-
1yes, it can. e.g. utf8_general_bin doesn't make a difference if the chars are uppercase or lowercase. you use collation for the type of chars you want to store. maybe you saw a website in the past which couldn't display the german üöä or some frensh èéâ or other chars that don't belong to the 'english' keyboard. then the database admin choosed the wrong collation. – Kagome Apr 09 '16 at 15:20
-
Is there a universal Collation in relation to the example cited by Kagome that supports multi-language or can Collation be used at query level? – Want2bExpert Apr 09 '16 at 16:24
-
@Kagome - `utf8_bin` is the case _sensitive_ collation. `üöä` is undisplayable if the _charset_ is wrong collation is _not_ relevant. – Rick James Apr 10 '16 at 06:08
-
`utf8mb4` handles all languages. (`utf8` comes close.) `utf8mb4_unicode_520_ci` is the best for collation in that it 'correctly' handles various single-character and multi-character encodings for characters in most languages. – Rick James Apr 10 '16 at 06:11
-
You _can_ apply a different collation to a column or `WHERE` or `ORDER BY`. Please provide an example for discussion. – Rick James Apr 10 '16 at 06:12