Home | Previous Page | Next Page   Developing an Access Method > Writing Purpose Functions >

Optimizing Queries

To provide the optimum performance with an access method, perform the following actions:

Providing 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:

Splitting a Scan

The way in which you split a scan influences the ability of the access method to optimize performance during queries. You can choose to provide separate functions for each of the following purpose-function prototypes:

If you provide only an am_getnext purpose function, that one purpose function (and any UDRs that it calls) analyzes the query, scans, rescans, and performs end-of-query cleanup.

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