Single-table query
For single-table scans, when OPTCOMPIND is set to 0
or 1
and
the current transaction isolation level is Repeatable Read, the optimizer
considers two types of access plans.
If:
- An index is available, the optimizer uses it to access the table.
- No index is available, the optimizer considers scanning the table in physical order.
When OPTCOMPIND is not set in the database server configuration,
its value defaults to 2
. When OPTCOMPIND is set to 2
or 1
and
the current isolation level is not Repeatable Read, the optimizer
chooses the least expensive plan to access the table.