Home |
Previous Page | Next Page Access Methods > Access Method Flow >
A query might proceed as follows for the super_access access
method, which has only an am_getnext purpose
function:
- The access method am_getnext purpose function, get_next_record(),
uses DataBlade API functions to the initiate callback functions for error
handling.
- The database server prepares a table descriptor to identify
the index that the query specifies, a scan descriptor to describe
the query projection, and a qualification descriptor to describe
the query selection criteria.
- The database server passes a pointer to the scan descriptor
through get_next_record() to the access method.
The scan descriptor, in turn, points to the table descriptor and
qualification descriptor in shared memory.
- The access method get_next_record() function
takes the following actions:
- Calls VII accessor functions to retrieve
the index description and then calls DataBlade API functions to open that
index
- Calls accessor functions to retrieve the query projection and
selection criteria from the scan and qualification descriptors
- Calls the DataBlade API function (usually mi_dalloc())
to allocate memory for a user-data structure to hold the current
virtual-index data
- Begins its scan
- Each time that the access method retrieves a qualifying record,
it stores the row and fragment identifiers in the row-id descriptor.
- The database server executes get_next_record() to
continue scanning until get_next_record() returns MI_NO_MORE_RESULTS to
indicate to the database server that the access method has identified
every qualifying row.
- The access method calls a DataBlade API function to close the index
and release any allocated memory.
- The database server reports the results to the user or application
that initiated the query.
The steps in the preceding example illustrate the interaction
between the database server, the access method, and the DataBlade API.
Home |
[ Top of Page | Previous Page | Next Page | Contents |
Index ]