The following articles mainly describe the practical application and specific operation steps of the extended option in the MySQL EXPLAIN statement. We all know that there is an explain command in the MySQL database, its main function is to analyze the Running Effect of select statements. For example, explain can obtain select statements.
Indexes used, sorting,
How to Learn the extended option of MySQL explain statement
MySQL has an explain command that can be used to analyze the running effect of the SELECT statement. For example, explain can obtain the SELECT statement.Indexes used, sorting, and so on. In addition, the extended extension of explain can be used on t
Easily use the "Explain Shell" script to understand Shell commands
When we work on Linux, everyone will find the help information of shell commands. Although built-in help such as man pages And whatis commands are helpful, the output of man pages is very lengthy unless it is a person with Linux experience, otherwise, it is very difficult to obtain help information from a large number of man pages, and the output of the whatis command rarely exceeds on
WhatsnewinEdgeRails: EXPLAIN: Unknown: RunningEXPLAINmanuallyAutomaticEXPLAINforslowqueriesSilencingautomaticEXPLAINAsofthisw
What's new in Edge Rails: EXPLAIN: There are some new features related to EXPLAIN in the forthcoming Ruby on Rails 3.2 we 'd like to share: running EXPLAIN manually Automatic
Mysql Explain here to do a comprehensive collation of the data.
I. Grammar
Explain
For example: Explain select * from T3 where id=3952602;
Two. Explain output interpretation
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+| ID | Select_type | Table | Type | Possi
Tags: mysqlStudents with MySQL experience may encounter SQL slow query scenarios in the actual project, some scenarios are easy to locate the problem (such as a single table operation with slow query SQL, carefully check SQL statements are usually easy to locate index problems), and some complex business scenarios (such as multi-table union query dozens of fields and do group or sort operations), Manual Check SQL statement is often difficult to find the root of SQL bottleneck. At this point, My
MySQL execution Plan explain detailed 2015-08-10 13:56:27Category: MySQLThe explain command is the primary way to see how the query optimizer decides to execute a query.This feature has limitations and does not always tell the truth, but its output is the best information that can be obtained, and it is worth taking the time to understand, because you can learn how the query executes.Call explainAdding
, explainSELECT * FROM Uchome_space limit of union SELECT * FROM Uchome_space limit 10,10 will have the following results The second statement uses the Union 2.4 Dependent the second or subsequent SELECT statement in the Union Union, depending on the outside query 2.5 Union result Union results, as shown above There are a few more parameters, not here, not important. 3 table The table used for the output line, this parameter is obvious, easy to understand 4 type The connection type. There are s
8.8.2 EXPLAIN Output Format
The EXPLAIN statement provides information about the execution plan for the SELECT statement:
EXPLAIN returns the row information for each table used by the SELECT statement, which lists the order in which MySQL reads the output of the statements when they are processed.
MySQL solves all connections using nested loops, which means that
If you put the keyword explain,mysql in front of the SELECT statement, it explains how it handles the Select, providing an order about how tables are joined and joined.Each output row of the explain provides information about a table, and each row includes the following columns:1,id Select identifier. This is the query sequence number for the select.2,select_type can be used for any one typeSimple select (D
Excerpt from: http://www.jb51.net/article/33736.htmWith the help of explain, you know when to add an index to the table to use the index to find records and make the select run faster.If some problems arise due to improper use of the index, you can run analyze table to update the table's statistics, such as the cardinality of the key, which can help you make better choices in terms of optimization.Explain returns a row of records that includes the inf
The EXPLAINtbl_name or: EXPLAINSELECTselect_optionsEXPLAIN statement can be used as a synonym for DESCRIBE. It can also be used to obtain information about the SELECT statement to be executed by MySQL. The syntax of EXPLAINtbl_name is the same as that of DESCRIBEtbl_name or SHOWCOLUMNSFROMtbl_name. Before a SELECT statement
The EXPLAINtbl_name or: EXPLAIN SELECTselect_options EXPLAIN statement can be used a
Label:
Source: Persister
Links: http://www.blogjava.net/persister/archive/2008/10/27/236813.html
With the help of explain, you know when to add an index to the table to use the index to find records and make the select run faster. If some problems arise due to improper use of the index, you can run analyze table to update the table's statistics, such as the cardinality of the key, which can help you make better choices in terms of
EXPLAIN is the main way to see how the MySQL optimizer decides to execute a query, a feature that has limitations, that it will always tell the truth, but that it can get the best information. Learn to explain EXPLAIN, and you'll understand how the MySQL optimizer works so you can optimize MySQL.
how to invoke?Just add
Explanation of the usage of explain in mysql MySQLexplain
BitsCN.com
The explanation of mysql explain is clear.Of
With the help of explain, you will know when to add an index to the table to use the index to search for records so that select can run faster.If the index is not properly used, you can run analyze table to update the statistical information of the ta
Mysql experiment uses explain to analyze the index trend, mysqlexplain
Overview
Index is a required skill for mysql and a means to provide mysql query efficiency. Which of the following experiments can be understood? Mysql index rules can also be constantly optimized for SQL statements
Lab Purpose
This experiment aims to verify the leftmost principle of the composite index.
Description
This experiment is only used to verify the results of the actual u
uchome_space.uid = Uchome_spacefield.uidThe result is still the same, it should be stated that the UID is primary in both tables.4.4 Ref for each row combination from the preceding table, all rows with matching index values are read from this table. If the join uses only the leftmost prefix of the key, or if the key is not unique or primary key (in other words, if the join cannot select a single row based on the keyword), ref is used. If you use a key that matches only a few rows, the join type
* FROM Uchome_space limit 10,10 will have the following results The second statement uses the Union 2.4 Dependent the second or subsequent SELECT statement in the Union Union, depending on the outside query 2.5 Union result Union results, as shown above There are a few more parameters, not here, not important. 3 table The table used for the output line, this parameter is obvious, easy to understand 4 type The connection type. There are several parameters that introduce important and difficult
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.