MySQL table sharding Methods: MySQL
I. Let me explain why Table sharding is required.
When a piece of data reaches several millions, it takes more time for you to query the data at a time. If there is a joint query, I think it may die there. The
MySQL常用指令,java,php程序员,数据库工程师必备。程序员小冰常用资料整理MySQL common commands (for reference)The most common display commands are:1. Display the list of databases.show databases;2. Display the data table in the library:Use MySQL;Show tables;3, display the
Similarly, using the goods table to practice subqueries, the table structure is as follows:All data (cat_id associated with category.cat_id):Category table:Mingoods (test when connecting queries)First, sub-query 1,where sub-query: The result of the
Suppose A For loop for 0 10000; $i + +{ for0, $j + +) { }} for 0 ; $i + +{ for010000; $j + +) { }}Looking at the two for loops above, the total number of loops is the same. But for the MySQL database, this is not the case, we
Placeholder first, edit later
There are four ways to judge:
1. Show tables like 'testtable ';
This method is not easy to implement in the code.2. SelectTABLE_NAMEFromINFORMATION_SCHEMA.TABLESWhereTABLE_SCHEMA= 'Dbname'AndTABLE_NAME=
SQL query in the in, exists, not in, not exists usage and difference, sqlexists
1. in and exists
In connects the External table to the internal table as a hash (Dictionary set), while exists loops the External table and queries the internal table
Usage and difference of in, exists, not in, and not exists in SQL queries
1. in and exists
In connects the External table to the internal table as a hash (Dictionary set), while exists loops the External table and queries the internal table after
Table partitioning is only recently known Oh, I used to do is the table to achieve the billion level of data, I would like to give you a description of the MySQL table partition to create and use it, I hope to be helpful to you classmates.
Table
First, let's talk about why the tables are divided.When a piece of data reaches millions of, you spend more time searching for it, and if you have a joint query, I think it's possible to die there. The purpose of the sub-table is to reduce the
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.