A short text plan lets you view a brief version of the query execution plan.
Prerequisites
You must be the owner of the object(s) upon which the function is executed, or have the appropriate SELECT, UPDATE, DELETE, or INSERT privileges on the object(s).
Connect to a database.
Execute the EXPLANATION function.
Example
In this example, the short text plan is based on the following statement:
SELECT EXPLANATION ('SELECT GivenName, Surname, OrderDate FROM GROUPO.Customers JOIN GROUPO.SalesOrders WHERE CustomerID < 100 ORDER BY OrderDate'); |
The short text plan reads as follows:
Work[ Sort[ Customers<CustomersKey> JNL SalesOrders<FK_CustomerID_ID> ] ]
The short text plan starts with Work[Sort
because the ORDER BY clause causes the entire result set to be sorted. The Customers table is accessed by its primary key
index, CustomersKey. An index scan is used to satisfy the search condition because the column Customers.ID is a primary key.
The abbreviation JNL indicates that the optimizer chose a merge join to process the join between Customers and SalesOrders.
Finally, the SalesOrders table is accessed using the foreign key index FK_CustomerID_ID to find rows where CustomerID is less
than 100 in the Customers table.
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |