MySQL tablespace Test

Source: Internet
Author: User

The configuration file of the newly added tablespace mainly uses this parameter.
Test Environment
Innodb_data_file_path = ibdata1: 370 M; ibdata2: 50 M; ibdata3: 50 M; ibdata4: 500 M; ibdata5: 500 M: autoextend

There are several situations
1. During online environment, my tablespace was not planned before. After using it for a period of time, I want to add a new tablespace. In this case, I need to first obtain the ibdata1 size, my method is to configure a random size in the configuration, such as 371 mb. when mysql is started, an error will not be reported. Check the error log, which contains the size of pages, calculate the ibdata1 size by the size of this pages.
Ibdata = pages * page_size/1024
Page_size = 16 k (mysql Default, which can be changed during compilation. Next, we will test the impact of this value on performance)
(The normal method for obtaining the tablespace size is not found; the value of du-h is too large, minus 1, 2 M. You can try it)

2. Plan the table space usage and size before using mysql, as shown in figure
Innodb_data_file_path = ibdata1: 10G; ibdata2: 10G; ibdata3: 10G; ibdata4: 10G; ibdata5: 10G: autoextend
This method is ideal.

Table space usage
If you use the 2nd method to create a tablespace, the five tablespaces will be created after initialization, but the disk space will be occupied first. If you use these five tablespaces, they will still be used in order, the first is full and the second is used.

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.