MySQL Forums
Forum List  »  Optimizer & Parser

Re: Optimize - Using Temp, Using Filesort, Group By Having
Posted by: Rick James
Date: April 19, 2011 10:40PM

767 comes from the 255 in VARCHAR, times 3 for utf8. It is not necessarily "wrong". It is bulky if you don't need it.

It is good to have utf8 as the default throughout the database. But if you are storing a hex number, SSN, post code, part number, ip address, etc., then it makes more sense to declare it ascii and/or limit it to a realistic size. Certain indexing, sorting, filtering, etc, things can benefit somewhat.

utf8 is an encoding that stores English as 1-byte characters; European languages as 1-, sometimes 2-byte characters, Most Asian languages as 3-byte characters. Still, there are some internal operations where MySQL pre-allocates 3 bytes per character, regardless of what the text is.

Options: ReplyQuote

Written By
Re: Optimize - Using Temp, Using Filesort, Group By Having
April 19, 2011 10:40PM

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.