MySQL Single table size limit

Source: Internet
Author: User

The size limit of a single MySQL table is defined in the current technical environment by the file system on the OS of the host, rather than by the MySQL database itself.

In earlier versions of MySQL 3.22, the size of a single MySQL table is 4 GB. At that time, the MySQL storage engine was still 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 documentation ). That is to say, from the current technical environment, the single table size limit of the MyISAM storage engine of the MySQL database is not 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, therefore, its size limit is no longer a file size limit, but its own limit. 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
Java code
Win32 w/FAT/FAT32 2 GB/4 GB
Win32 w/NTFS 2 TB may be 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

Win32 w/FAT/FAT32 2 GB/4 GB
Win32 w/NTFS 2 TB may be 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.

How to install a MySQL source package

How to create an association table in MySQL

Create a table in Mysql

About date format conversion functions in MySQL Query

Implementation of querying the first letter of Chinese characters and Pinyin in MySQL

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.