A temporary table is used by an access plan to store data during its execution in a transient or temporary work table. This table only exists while the access plan is being executed. Generally, temporary tables are used when intermediate results do not fit in the available memory, such as:
When subqueries need to be evaluated early in the access plan.
When data in a temporary table is held for a single connection only.
When a query contains an ORDER BY on a column other than an index.
When a query contains a GROUP BY on a column other than an index.
You can avoid using temporary tables by using an index for the columns used in the ORDER BY or GROUP BY clauses.
Discuss this page in DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|