Connect.gt

Condividiamo idee e conoscenza dal 2003...
...dopo 17 anni una Nuova Storia è nata
Scopri di più

Dimensioni Dati di MySQL

Fonte: Sito ufficiale di MySQL

Data Type Storage Required

TINYINT 1 byte

SMALLINT 2 bytes

MEDIUMINT 3 bytes

INT, INTEGER 4 bytes

BIGINT 8 bytes

FLOAT 4 bytes

DOUBLE [PRECISION], REAL 8 bytes


Precisione: SMALLINT[(M)] [UNSIGNED] [ZEROFILL]

A small integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535.

MEDIUMINT[(M)] [UNSIGNED] [ZEROFILL]

A medium-sized integer. The signed range is -8388608 to 8388607. The unsigned range is 0 to 16777215.

INT[(M)] [UNSIGNED] [ZEROFILL]

A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295.

BIGINT[(M)] [UNSIGNED] [ZEROFILL]

A large integer. The signed range is -9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615.


DATE 3 bytes

DATETIME 8 bytes

TIMESTAMP 4 bytes

TIME 3 bytes

YEAR 1 byte


Data Type Storage Required

CHAR(M) M bytes, 0 <= M <= 255

VARCHAR(M) Prior to MySQL 5.0.3: L + 1 bytes, where L <= M and 0 <= M <= 255. MySQL 5.0.3 and later: L + 1 bytes, where L <= M and 0 <= M <= 255 or L + 2 bytes, where L <= M and 256 <= M <= 65535 (see note below).

BINARY(M) M bytes, 0 <= M <= 255

VARBINARY(M) Prior to MySQL 5.0.3: L + 1 bytes, where L <= M and 0 <= M <= 255. MySQL 5.0.3 and later: L + 1 bytes, where L <= M and 0 <= M <= 255 or L + 2 bytes, where L <= M and 256 <= M <= 65535 (see note below).

TINYBLOB, TINYTEXT L+1 byte, where L < 28

BLOB, TEXT L+2 bytes, where L < 216

MEDIUMBLOB, MEDIUMTEXT L+3 bytes, where L < 224

LONGBLOB, LONGTEXT L+4 bytes, where L < 232

ENUM('value1','value2',...) 1 or 2 bytes, depending on the number of enumeration values (65,535 values maximum)

SET('value1','value2',...) 1, 2, 3, 4, or 8 bytes, depending on the number of set members (64 members maximum)


  • Questa pagina è stata modificata per l'ultima volta il 4 giu 2007 alle 11:14.
  • Questa pagina è stata letta 1 023 volte.