Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Elements Reference » Query access plans in UltraLite

When to view a query access plan Next Page

Viewing an UltraLite query access plan


As a development aid, you can use Interactive SQL to display an UltraLite plan that summarizes how a prepared statement is to be executed. The plan is displayed on a tab in the Results pane of the utility.

In UltraLite, a query plan is strictly a short textual summary of the plan. No other plan types are supported. However, being a short plan, it allows you to compare plans quickly, because information is summarized on a single line.

Consider the following statement:

SELECT I.inv_no, I.name, T.quantity, T.prod_no
FROM Invoice I, Transactions T
WHERE I.inv_no = T.inv_no

This statement might produce the following plan:

join[scan(Invoice,primary),index-scan(Transactions,secondary)]

The plan indicates that the join operation is accomplished by reading all rows from the Invoice table (following index named primary) and then using the index named secondary from the Transactions table to read only the row whose inv_no column matches.

See also