Explain can parse the execution of the SELECT statement, which is the "execution plan" of MySQL.One, type columnMySQL finds the desired line in the table. Include (from left to right, from worst to best): | All | Index | Range | Ref | Eq_ref | Const,system | null |All (All)Full table Scan, MySQL scans the entire table to find rows from beginning to end. Mysql> Explain select * from A\g ...Type:all if a limi
accessing data from oracle 1) Full Table scan (Full Table Scans, FTS)To scan the entire table, Oracle reads all rows in the table, check whether each row meets the WHERE restrictions of the statement. One multi-block read operation allows I/O to read multiple data blocks (db_block_multiblock_read_count parameter setting ), instead of reading only one data block, this greatly reduces the total number of I/O operations and increases the system throughput, therefore, the multi-block read method c
Explain can analyze the execution of select statements, that is, the execution plan of MySQL. The type column MySQL finds the required rows in the table. Including (from left to right, from worst to best): | All | index | range | ref | eq_ref | const, system | null | MySQLexplain
Explain can analyze the execution of select statements, that is, the "execution plan" of MySQL.
Type column
MySQL finds the requi
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 optimization.Explain returns a row of records that includes the information for each table used in the SELECT statemen
In an Oracle database, the need to optimize the SQL statement requires knowledge of its execution plan, which is tailored accordingly. There are several ways to get Oracle's execution plan, and here's a summary
1, the use of explain
Oracle RDBMS executes every SQL statement and must be evaluated by the Oracle Optimizer. So, understanding how the optimizer selects (searching) the path and how the index is used is a great help for optimizing SQL stateme
Tags: tor should be inf POS where Col code span customerrelational database, the Internet-related industry is undoubtedly the most use of MySQL, although we C # Developer a lot of SQL Server, but learning some of the knowledge of MySQL is also necessary, he stone of the mountain. Let's start with an instance of explain, and I'll explain the meaning of each column in the table by my own understanding . (For
Mysql-EXPLAIN,Select_type Column
This column shows whether the corresponding row is simple or complex SELECT (if complex SELECT is used, which of the three complex types is used ). The SIMPLE value means that the query does not include subqueries and UNION. If the query contains any complicated child parts, the outermost part is marked as PRIMARY, and the other part is marked as follows:
SUBQUERY:Include SELECT in subqueries in the list
Label:Turn from: http://blog.csdn.net/zhuxineli/article/details/14455029, is to make a note, the collection. Explain shows how MySQL uses indexes to process SELECT statements and join tables. Can help select better indexes and write more optimized query statements. Parse an SQL statement first to see what appears EXPLAINSELECTS.Uid,S.Username,S.Name,F.Email,F.Mobile,F.Phone,F.PostalCode,F.AddressFromUchome_spaceAsS,Uchome_spacefieldAsFwhere 1NBSP; a
. Now executes a statement, 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 parameters, which is not said, not important 3 table The table used for the output line, this parameter is obvious, easy to understand 4 type Th
EXPLAIN the usage of MySQL Execution Plan Analysis ToolFamiliar with SQL Execution Plan analysis skills for DBAs is vital for quickly locating database performance problems. The following describes how to analyze MySQL execution plans.1. EXPLAIN how to use EXPLAIN: explain select ......
Variant: 1.
EXPLAIN is the main method for viewing how the MySQL Optimizer determines how to execute a query. this function has limitations, so that it always tells the truth, but can obtain the best information. after learning to EXPLAIN, you will understand how the MySQL Optimizer works and how you can optimize MySQL. how to call EXPLAIN is the main method to check how the
When analyzing query performance, it is also useful to consider the EXPLAIN keyword. The EXPLAIN keyword is generally placed before the SELECT query statement to describe how MySQL performs the query operation, and the number of rows to be executed in the result set returned by MySQL. Explain helps us analyze the select statement and let us know why the query eff
In
ORACLE database, you need to
SQLStatement to optimize the words need to know its implementation plan, and accordingly to adjust. There are several ways to get Oracle's execution plan, and here's a summary1, the use of explain Oracle RDBMS executes every SQL statement, and must be evaluated by the Oracle Optimizer. So, understanding how the optimizer selects (searching) the path and how the index is used is a great help for optimizing SQL statemen
Transferred from: http://www.blogjava.net/persister/archive/2008/10/27/236813.htmlWith 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 o
EXPLAIN is a keyword used by mysql to EXPLAIN select queries and can be easily used for debugging.
EXPLAIN is a keyword used by mysql to EXPLAIN select queries and can be easily used for debugging.
Syntax format:
EXPLAIN tbl_name
Or:
Ex
Label:The explain command in MySQL shows how MySQL uses the index to process SELECT statements and join tables. The information displayed by explain can help you select better indexes and write more optimized query statements. How to use 1.EXPLAIN:Add explain to the SELECT statement before you can do it. Such as: Explain
Explain can analyze the execution of the select statement, that is, the "Execution Plan" of MySQL.
Type Column
MySQL finds the required rows in the table. Including (from left to right, from worst to best): | All | index | range | ref | eq_ref | const, system | null |
ALL full table scan. MySQL scans the entire table from start to end to find rows. Mysql> explain select * from a \ G...Type: ALL
If limit is
I. Grammar
Explain
For example: Explain select * from T3 where id=3952602;
Two. Explain output interpretation
The code is as follows
Copy Code
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+| ID | Select_type | Table | Type | Possible_keys | Key | Key_len | Ref | Rows | Extra |+-
DB2 does not exist in the explain table of the SQL Execution Plan by default. Therefore, you need to create an explain table as needed during use. How can you create it? In fact, DB2 still provides a variety of methods for you to use. The first method is to use the script EXPLAIN. DDL by default, which is created in the following path of the database by default:
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.