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

@@identity Next Page

Query access plans in UltraLite

UltraLite query access plans show how tables and indexes are accessed when a query is executed. UltraLite includes a query optimizer: an internal component of the UltraLite runtime that attempts to produce an efficient plan for the query: it tries to avoid the use of temporary tables to store intermediate results and attempts to ensure that only the pertinent subset of a table is accessed when a query joins two tables.

Overriding the optimizer

The optimizer always aims identify the most efficient access plan possible, but this goal is not guaranteed—especially with a complicated query where a great number of possibilities may exist. In extreme cases, you can override the table order it selects by adding the OPTION (FORCE ORDER) clause to a query, which forces UltraLite to access the tables in the order they appear in the query. This option is not recommended for general use. If performance is slow, a better approach is usually to create appropriate indexes to speed up execution.

Performance tip

If you are not going to update data with the query, you should try specifying the FOR READ ONLY clause in your query. This clause may yield better performance.

When to view a query access plan
Viewing an UltraLite query access plan
Reading UltraLite access plans