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
Mysql uses the. SQL file to import data to the renamed SQL statement if the TABLE exists. if the TABLE table1 is imported, the TABLE table1 first needs to be modified.
How can I write this SQL statement? Thank you.
Reply to discussion
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
-- ------------------------------determines whether the Vrv_paw_rule table exists thresholdmin field, does not exist, and then modifies the field type.DELIMITER??DROP PROCEDURE IF EXISTSschema_change??CREATE PROCEDURESchema_change ()BEGINIF not
MySQL creates a table and creates a . frm file to save the table and column definitions. The index is stored in one . MYI (Myindex) and the data is stored in the . MYD (MYData) file extension. First, using Show/describe statement to display the data
first, to determine whether the database table exists:
First you have to get the database connection conn, call DatabaseMetaData Dbmd = Conn.getdatameta (), and then call the following methods:
Copy Code code as follows:
/**
*
When creating a table, MySQL creates a. frm file to save the table and column definitions. Indexes are stored in a file with the. MYI (MYindex) Extension and data is stored in a file with the. MYD (MYData) extension.
1. Use the SHOW/DESCRIBE
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.