In mysql I have a column (LANG) that contains the same value (EN), the number of lines exceeds the 100,000 lines at the moment
The column can take the same value among these IT, FR, DE, ES, EN is there any solution to optimizes the table? thanks
If you have a column that contain one of a known values (from a list) you should use an ENUM column type (and not a string/varchar one, for example):
ENUM
string/varchar
CREATE TABLE `t1` ( `ID` INT NOT NULL AUTO_INCREMENT , `LANG` ENUM('EN','IT','FR','DE','ES','EN') NOT NULL , PRIMARY KEY (`ID`) ) ENGINE = InnoDB;
The ENUM storage requirements are
1 or 2 bytes, depending on the number of enumeration values (65,535 values maximum)
Copyright © 2021 Jogjafile Inc.
If you have a column that contain one of a known values (from a list) you should use an
ENUM
column type (and not astring/varchar
one, for example):The
ENUM
storage requirements are