16. mysql partitioning with simple SQL optimization 2_MySQL

Source: Internet
Author: User
16. mysql partitioning-SQL optimization 2
1. index classification B-Tree supports HASH. Only memory supports R-Tree myisam and supports Full-text myisam (Full-text index. only the "=" condition in the Memory engine uses the index ======================== === data import optimization =========================== 3. how to improve myisam import efficiency alter table emp disable keys; disable index load data infile 'AA. SQL 'into table emp; import data to emp alter table emp enable keys; enable index 4. how to improve the efficiency of innodb import data can be arranged in the order of primary keys. disable the uniqueness check set unique_checks = 0; load data infile .... set unique_checks = 1; enable the check ================================== Insert optimization ==== ================================= 1. insert into emp values (1, 2, 3), (1, 2 ),..... ==================================== page optimization ======== ================================= 1. use inner join inline 2. the general idea of processing on the application end is to record the id of the last record on the previous page. the next page uses this id as the starting value, but this must ensure that the id is unique.

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.