Accelerate MySQL index query using an SSD Hard Disk

Source: Internet
Author: User
Tags mysql index

Accelerate MySQL index query using an SSD Hard Disk

For more information, see: http://www.javaarch.net/jiagoushi/index.htm

If the data volume is large and the SSD capacity is not large, you can save the index data to the SSD to store the table data on the old hard disk.

So how can MySQL build index on SSD and use index data on SSD?

1. Create several directories on SSD

Mkdir/SSD/mysql_indexes

Mkdir/SSD/mysql_indexes/my_big_db_name

Chmod 700/SSD/mysql_indexes

Chown-r MYSQL: MySQL/SSD/mysql_indexes

2. If you use the MyISAM engine, you can add the following configuration in MySQL configuration to accelerate index reconstruction.

[Mysqld]

Myisam_repair_threads = 10

3. Finally, execute the following query to allow MySQL to switch the index data location of the table.

Alter table my_table index directory = '/SSD/mysql_indexes/my_big_db_name ';

This must wait until the index of MySQL is rebuilt to make it obvious that the database is getting faster.

 

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.