Home | Previous Page | Next Page   Purpose-Function Reference > Purpose-Function Syntax >

am_rescan

The database server typically calls am_rescan to process a join or subquery that requires multiple scans on the same index.

Syntax

mi_integer am_rescan(MI_AM_SCAN_DESC *scanDesc)
scanDesc
points to the scan descriptor.

Usage

Although am_rescan is an optional purpose function, the access method can enhance efficiency by supplying am_rescan for applications that involve joins, subqueries, and other multiple-pass scan processes. The am_rescan purpose function ends the previous scan in an appropriate manner and begins a new scan on the same open index.

Without an am_rescan purpose function, the database server calls the am_endscan function and then am_beginscan, if the access method provides these functions.

Tip:
To determine if an outer join might cause a constant value to change, call mi_qual_const_depends_outer(). To determine the need to reevaluate the qualification descriptor, call mi_scan_newquals() from am_rescan.

Return Values

MI_OK indicates success. MI_ERROR indicates failure.

Related Topics

See the descriptions of:

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]