1

I am converting a few of my tables to utf8mb4 as well as the connection from PHP to MySQL to utf8mb4. This is so that I can support characters used for Emoji in my website.

I have two questions regarding this change:

1) Is it a problem having some tables as "utf8", even though the connection to MySQL now is "utf8mb4"? Can there be collation conflicts?

2) Do "utf8mb4" tables use more disk space, even if there is no utf8mb4 character stored on it?

3) Would you recommend me to change all the tables to utf8mb4?

Thank you!

1 Answer 1

2

There should be no space difference for VARCHAR and TEXT fields that contain 1- to 3-byte utf8 characters. CHAR is another matter.

A JOIN between utf8 (in one table) and utf8mb4 (in the other table) may lead to gross inefficiency. At least make sure you are consistent (both CHARACTER SET and COLLATION) on any columns that need to be compared to each other.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.