MySQL storage types and their limits

Below are some of the most used data types and its storage requirements:

Data type Storage required
TINYINT 1 byte
SMALLINT 2 bytes
INT 4 bytes
 BIGINT 8 bytes
FLOAT 4 bytes
DOUBLE, REAL 8 bytes
VARCHAR(x) x+1 byte if value is less than 255 bytes and x+2 bytes if over 255 bytes.
TINYTEXT 255 bytes
TEXT 65 535 bytes
MEDIUMTEXT 16 777 215 bytes
LONGTEXT 4 294 967 295 bytes


  • Characters can take up different amount of space depending on character encoding. Regular English ASCII characters only take 1 byte per character, meaning that a TEXT column can fit 65 535 characters (a-Z, 0-9 and some special signs)
  • VARCHAR(180) will require 181 bytes of space, regardless if it’s empty or not.

Date formats:

Data type < MySQL 5.6.4 > MySQL 5.6.4
YEAR 1 byte 1 byte
DATE 3 bytes 3 bytes
TIME 3 bytes 3 bytes + fractional seconds storage
DATETIME 8 bytes 5 bytes + fractional seconds storage
TIMESTAMP 4 bytes 4 bytes + fractional seconds storage


Format disk with diskpart

Below is a quick guide to illustrate how we can format a disk using diskpart.

First open the command prompt (if booting from Windows install media you may be able to open the command prompt by pressing F8 or Shift+F10).

In your command prompt, type diskpart to enter the diskpart utility. Your input cursor should now look like DISKPART> and you are ready to run the commands below:

list all disks connected to your computer

list disk 

select the disk you wish to format. Replace X below with the number you see from list disk

select disk X 

marks everything on the disk to be deleted – you could also use “clean all” to actually delete it, but this will take a while


convert disk to MBR – you could also change mbr with gpt

convert mbr 

create a new primary partition

create partition primary 

select the newly created partition

select part 1 

make it active if this is the boot partition


format it to NTFS fileystem and set label to whatever you wish

format fs=ntfs label=X quick 

assign a letter to the partition, typically C for the Windows drive

assign letter C 

list volumes to verify the results

list vol

For more information about Diskpart, see: