MySQL Table upper Limit

Source: Internet
Author: User
Tags table definition

One, the upper limit of the number of rows

1. Official documents

There is a limit of (2^32) ^2 (1.844E+19) rows in a MyISAM table.

This is the theoretical upper limit of the number of lines in MySQL, but is actually not up to

2. myisam_data_pointer_size  Restrictions

The actual maximum number of rows is also myisam_data_pointer_size limited, 64 bits is mysql的myisam_data_pointer_size usually 6, or 48 bits, and the number of rows is 2^48-1 = 281474976710655.

3. Limit of storage space

Storage space size limit for table (Storage limits): 256TB.

So as long as you know the space required for the smallest line, you can find the maximum number of records that can be saved.

Two, the limit of the number of columns

MySQL has a hard limit of 4,096 columns per table, but the valid maximum value for a given table may be less. The exact column limit depends on several factors:

    1. The maximum row size of a table limits the number of columns (possibly size), because the total length of all columns cannot exceed this size. See Row Size Limits

    2. The storage requirements for a single column limit the number of columns that are appropriate for a given maximum row size. The storage requirements for some data types depend on factors such as storage engine, storage format, and character set. See Data type Storage requirements

    3. The storage engine may impose additional restrictions that limit the table column count. For example, the InnoDB limit for each table is 1017 columns. See limitations on InnoDB tables for information about other storage engines, see alternative storage engines

    4. Each table has a. frm file that contains the table definition. The definition affects the contents of this file in such a way that it may affect the number of columns allowed in the table. See limitations caused by the. frm file structure

MySQL Table upper Limit

Related Article

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.