Insert 5 million data records in MYSQL in the optimal way

Source: Internet
Author: User
MYSQL inserts 5 million data records. the optimal way to insert a table is simple: id, name, area, sex, lasttime. innodbcollateutf8_general_ci ------ solution ------------------ use the LOADDATAINFILE command to load files in csv format ------ solution --------- insert 5 million pieces of data in MYSQL and insert the data in the optimal way
The table structure is relatively simple: id, name, area, sex, lasttime. innodb collate = utf8_general_ci

------ Solution --------------------
Process files in csv format
Load data infile command
------ Solution --------------------
What types of files are collected?
------ Solution --------------------
BigDump
------ Solution --------------------
Discussion

Process files in csv format
Load data infile command

------ Solution --------------------
You can delete the index and import it before recreating it.

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.