SortsortSort performs the sorting specified by the ORDER BY clause as well as other operations such as UNIONs and joins. Can operate from disk. MergemergeProduces final sorted results of a query based on intermediate sorted results derived from operations performed in parallel. ...
<derivedN>:ID值n的行的派生表结果,派生表可能是从FROM子句中的一个子查询生成的(The row refers to the derived table result for the row with an id value of N. A derived table may result, for example, from a subquery in the FROM clause.)。 <subqueryN>:ID值n的行的物化子查询结果。 4....
Sort is used to sort data in ascending order (ASC) or descending order (DESC), which is usually used with the ORDER BY clause. In this example, data in the l_shipdate column of the TPC-H lineitem table is sorted. EXPLAIN SELECT l_shipdate FROM public.lineitem ORDER BY l_shipdat...
unionM,N: The row refers to the union of the rows with id values of M and N. derivedN: The row refers to the derived table result for the row with an id value of N. A derived table may result, for example, from a subquery in the FROM clause. subqueryN: The row refers to the...
Some of these factors include: » Data skew » Multiple single column predicates on a single table » Function wrapped columns in the WHERE clause predicates » Complex expressions In the previous example there is a data skew in the EMPLOYEES table. There is not an even number of ...
filtered- The amount of rows unfiltered by the conditions in the WHERE clause. These rows will be joined to the table in the next row of the EXPLAIN plan. As mentioned previously, this is a guesstimate as well, so MySQL can be wrong with this estimation. ...
After reviewing the query again, consider that a multiple-column index can meet the conditions of the WHERE clause that is based on both the o_orderdate and o_clerk columns as the next statement shows. CREATE INDEX io_clerk_date ON orders(o_clerk, o_orderdate)...
Another perfect use case for an index is sorting the results with anORDER BYclause: User.discarded.order(:discarded_at).analyze# SELECT * FROM users WHERE discarded_at IS NOT NULL AND (discarded_at < '2021-03-11 23:04:02.485880') ORDER BY discarded_at ASC# Index Scan using index_users...
<unionM,N>: The row refers to the union of the rows with id values of M and N. <derivedN>: The row refers to the derived table result for the row with an id value of N. A derived table may result, for example, from a subquery in the FROM clause. <subqueryN>: The row ...
Example 12-3 Using EXPLAIN PLAN with the INTO Clause EXPLAIN PLAN INTO my_plan_table FOR SELECT last_name FROM employees; You can specify a statement ID when using the INTO clause. EXPLAIN PLAN SET STATEMENT_ID = 'st1' INTO my_plan_table FOR SELECT last_name FROM employees; See Also...