Use of PROCEDURE ANALYSE() can help you determine whether columns can be redefined to smaller data types. It can also determine whether a column contains only a small number of values and could be defined as ENUM. To tell PROCEDURE ANALYSE() not to suggest long ENUM definitions, pass it two arguments indicating the maximum number of elements and number of characters allowed in the definitions:

mysql> SELECT * FROM CountryLanguage PROCEDURE ANALYSE(10,256)\G
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License