Specifies an index scan of a base table.
( i_scan index_name base_table )
( i_scan () base_table )
is the name or index ID of the index to use for an index scan of the specified stored table. Use of empty parentheses specify that an index scan (rather than table scan) is to be performed, but leaves the choice of index to the optimizer.
is the name of the base table to be scanned.
An abstract plan derived table produced by a scan of the base table.
select * from t1 where c11 = 0
( i_scan i_c11 t1 )
Specifies the use of index i_c11 for a scan of t1.
select * from t1, t2 where c11 = 0 and c22 = 1000 and c12 = c21
( g_join ( scan t2 ) ( i_scan () t1 ) )
Specifies a partial plan, indicating the join order, but allowing the optimizer to choose the access method for t2, and the index for t1.
select * from t1 where c12 = 0
( i_scan 2 t1 )
Identifies the index on t1 by index ID, rather than by name.
The index is used to scan the table, or, if no index is specified, an index is used rather than a table scan.
Use of empty parentheses after the i_scan operator allows the optimizer to choose the index or to perform a table scan if no index exists on the table.
When the i_scan operator is specified, a covering index scan is always performed when all of the required columns are included in the index. No abstract plan specification is needed to describe a covering index scan.
Use of the i_scan operator suppresses the choice of the reformatting strategy and the OR strategy, even if the specified index does not exist. The optimizer chooses another useful index and an advisory message is printed. If no index is specified for i_scan, or if no indexes exist, a table scan is performed, and an advisory message is printed.
Although specifying an index using the index ID is valid in abstract query plans, using an index ID is not recommended. If indexes are dropped and re-created in a different order, plans become invalid or perform suboptimally.