Provide optimizer information
In response to a SELECT statement, the query optimizer compares the cost of alternative query paths.
To determine the cost for the access method to scan the
virtual index that it manages, the optimizer relies on two sources
of information:
- The cost of a scan that the access method performs on its virtual
index
The am_scancost purpose function calculates and returns this cost to the optimizer. If you do not provide an am_scancost purpose function, the optimizer cannot analyze those query paths that involve a scan of data by the access method.
- The distribution statistics that the am_stats purpose
function sets
This purpose function takes the place of the type of distribution analysis that the database server performs for an UPDATE STATISTICS statement.