Search without index
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
You can use the TABLE-SCAN option as an
alternative to the USE-INDEX keyword in FOR
EACH statements.
TABLE-SCAN provides the most efficient access method
when retrieving all rows of a temp-table or a database table in
a Type II Storage area. TABLE-SCAN returns these
rows without using an index. When the TABLE-SCAN keyword
is used, the AVM only accesses the record block instead of both
record and index blocks.
Syntax
|
For a table in a Type I storage, the AVM uses the default index
to perform the scan instead of TABLE-SCAN. If the QryInfo log
entry is set, the AVM logs message when the TABLE-SCAN keyword
is used on a Type I Storage area.
Note: The
TABLE-SCAN keyword is not
supported in any dynamic query statement and methods. For example,
for the QUERY-PREPARE (“FOR EACHmytblTABLE-SCAN”)
method a runtime error is raised, stating: “TABLE-SCAN option
is not allowed in dynamic query”.