Originariamente inviato da emanueledg
In fase di ottimizzazione di un DB, seguendo anche i suggerimenti della funzione PROCEDURE ANALYSE() di MySQL, ho sostituito un campo INT(1) con un ENUM contenente i possibili valori numerici (sono una ventina), ma le prestazioni del DB non sono migliorate, come io mi aspettavo.

Al contrario, il tracking ripetuto conferma che perdo il 20% di potenza.

A quale scopo allora adottare un tipo ENUM anziché un INT?
Dal manuale ... nota il neretto.
The results show some statistics for the values returned by the query, and propose an optimal data type for the columns. This can be helpful for checking your existing tables, or after importing new data. You may need to try different settings for the arguments so that PROCEDURE ANALYSE() does not suggest the ENUM data type when it is not appropriate.

The arguments are optional and are used as follows:

*

max_elements (default 256) is the maximum number of distinct values that analyse notices per column. This is used by analyse to check whether the optimal data type should be of type ENUM.
*

max_memory (default 8192) is the maximum amount of memory that analyse should allocate per column while trying to find all distinct values.
http://dev.mysql.com/doc/refman/5.0/...e-analyse.html