100 million how data is divided into 100 tables in MySQL database (PHP), 100 mysql_php Tutorials

Source: Internet
Author: User

100 million how data is divided into 100 tables in MySQL database (PHP), 100 MySQL


Below is a list of the next 100 million data by creating 100 tables, see the code below.

When the amount of data surges, we will choose the library table hash and so on to optimize the data read and write speed. The author made a simple attempt, 100 million data, divided into 100 sheets. The specific implementation process is as follows:

First create 100 tables:

Here's my table rule, full_code as the primary key, we hash the full_code.

The functions are as follows:

This gets the table name of the data stored by get_hash_table before inserting the data.

Finally, we use the merge storage engine to implement a complete code table

So we can get all the full_code data with SELECT * from code .

The above introduction is the whole content of this article, I hope to help you.

http://www.bkjia.com/PHPjc/1039184.html www.bkjia.com true http://www.bkjia.com/PHPjc/1039184.html techarticle 100 million How data is divided into 100 tables in MySQL database (PHP), 100 mysql below by creating 100 tables to demonstrate the next 100 million data of the sub-table process, see the following code. When data ...

  • 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.