i_scan

Description

Specifies an index scan of a base table.

Syntax

( i_scan index_name base_table )
( i_scan () base_table )

Parameters

index_name

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.

base_table 

is the name of the base table to be scanned.

Returns

A derived table produced by a scan of the base table.

Examples

Example 1

select * from t1 where c11 = 0

( i_scan i_c11 t1 )

Specifies the use of index i_c11 for a scan of t1.

Example 2

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.

Example 3

select * from t1 where c12 = 0

( i_scan 2 t1 )

Identifies the index on t1 by index ID, rather than by name.

Usage

See also

scan, t_scan