FROM TABLE

FROM TABLE shows that a PARTITION SCAN operator is reading a database table. A second message gives the table name, and, if there is a correlation name, it is printed on the next line. Under the FROM TABLE message in the previous example output, sysobjects is the table name and s is the correlation name. The previous example also shows additional messages under the FROM TABLE message. These messages give more information about how the PARTITION SCAN operator is directing the access layer of Adaptive Server to get the rows from the table being scanned.

The messages below indicate whether the scan is a table scan or an index scan:

These messages indicate the direction of a table or index scan. The scan direction depends on the ordering specified when the indexes were created and the order specified for columns in the order by clause or other useful orderings that can be exploited by operators further up in the query plan (for example, a sorted ordering for a merge-join strategy).

Backward scans can be used when the order by clause contains the ascending or descending qualifiers on index keys, exactly opposite of those in the create index clause.

The scan-direction messages are followed by positioning messages, which describe how access to a table or to the leaf level of an index takes place:

If the scan can be limited due to the nature of the query, the following messages describe how:

NoteIf the index key is sorted in descending order, the above messages for minimum and maximum aggregates are reversed.

In some cases, the index being scanned contains all of the columns of the table that are needed in the query. In such a case, this message is printed:

Index contains all needed columns. Base table will not be read.

If an index contains all the columns needed by the query, the optimizer may choose an Index Scan over a Table Scan even though there are no useful keys on the index columns. The amount of I/O required to read the index can be significantly less than that required to read the base table. Index scans that do not require base table pages to be read are called covered index scans.

If an index scan is using keys to position the scan, this message prints:

This message shows the names of the columns used as keys (each key on its own output line) and shows the index ordering on that key: ASC for ascending and DESC for descending.

After the messages that describe the type of access being used by the scan operator, messages about the I/O sizes and buffer cache strategy are printed.