MySQL Single table size

Source: Internet
Author: User

 

In earlier versions of MySQL 3.22, the single table size of MySQL is 4 GB. At that time, the storage engine of MySQL was also the ISAM storage engine. However, when the MyISAM storage engine appears, that is, starting from MySQL 3.23, the maximum limit for a single MySQL table has been extended to 64 Pb (as shown in the official document ). That is to say, from the current technical environment, the single table size limit of the MyISAM storage engine of the MySQL database is no longer determined by the MySQL database itself, it is determined by the file system on the OS of the host.

 

One of the most popular storage engines in MySQL, Innodb, has two data storage policies: Shared tablespace storage and exclusive tablespace storage.

When using the shared tablespace storage method, all data in Innodb is stored in a single tablespace, which can be composed of multiple files. A table can exist across multiple files, its size limit is not a limitation of the file size, but its own limitation. From the official Innodb documentation, we can see that the maximum tablespace limit is 64 TB. That is to say, the single table limit of Innodb is about 64 TB, of course, this size includes all indexes of the table and other related data.

When an exclusive tablespace is used to store Innodb tables, the data in each table is stored in a separate file. In this case, the single table is limited, the size of the file system is limited.

 

The following information is not necessarily accurate:

Operating system size limit

Win32 w/FAT/FAT32 2 GB/4 GB

Win32 w/NTFS 2 TB (larger)

Linux 2.2-Intel 32-bit 2 GB (LFS: 4 GB)

Linux 2.4 + 4 TB (ext3)

Solaris 9/10 16 TB

NetWare w/NSS filesystem 8 TB

MacOS X w/HFS + 2 TB

The following is the content in the MySQL document:

For Windows users, note that FAT and VFAT (FAT32) are not suitable for MySQL production. NTFS should be used.

 

By default, the maximum size of MyISAM Table created by MySQL is 4 GB. You can use the show table status statement or myisamchk-dv tbl_name to check the maximum size of the TABLE. See section 13.5.4 "SHOW Syntax ".

 

To use a MyISAM TABLE larger than 4 GB (and your operating system supports large files), you can use the create table statement that allows the AVG_ROW_LENGTH and MAX_ROWS options. After creating a TABLE, you can also use alter table to change these options to increase the maximum allowed TABLE capacity.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.