This join typeis like ref, but with the addition that MySQL does an extra search for rowsthat contain NULL values. This join type optimization is used most often inresolving subqueries. In the following examples
Examples Note For these examples, the sample output might vary depending on Amazon Redshift configuration. The following example returns the query plan for a query that selects the EVENTID, EVENTNAME, VENUEID, and VENUENAME from the EVENT and VENUE tables: ...
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...
As a result, the query performance is poor. Keys such as the join key or group by key that are involved in expressions: If you use a CAST function to convert data types, the local join feature is not used. In this case, redistribution occurs. Examples: Example 1: Join two tables....
Examples Explain an SQL query and store the obtained execution plan in the test table. /* Create a table named test. */ obclient> CREATE TABLE test (statement_id VARCHAR(30), plan_id INT, gmt_create TIMESTAMP, remarks VARCHAR(4000), operator VARCHAR(255), options VARCHAR(255), object_...
Examples To show the plan for a simple query on a table with a singleintegercolumn and 10000 rows: EXPLAINSELECT*FROMfoo; QUERY PLAN---Seq Scanonfoo (cost=0.00..155.00rows=10000width=4) (1row) Here is the same query, with JSON output formatting: EXPLAIN (FORMAT JSON)SELECT...
This join type is like ref, but with the addition that MySQL does an extra search for rows that contain NULL values. This join type optimization is used most often in resolving subqueries. In the following examples, MySQL can use a ref_or_null join to process ref_table: SELECT * FROM...
(AWR) SQL Tuning Set (STS) SQL Plan Baseline (SPM) Using the EXPLAIN PLAN Command and the DBMS_XPLAN.DISPLAY Function The following examples illustrate how to generate and display an execution plan for our original SQL statement using the different functions provided in the DBMS_...
This join type is like ref, but with the addition that MySQL does an extra search for rows that contain NULL values. This join type optimization is used most often in resolving subqueries. In the following examples, MySQL can use a ref_or_null join to process ref_table: SELECT * FROM...
The EXPLAIN ANALYZE statement executes a query and generates a physical statement plan with execution statistics.