15.15.3. Creating Index Keys
As part of every table-write operation
(INSERT
, UPDATE
,
DELETE
), the storage engine is required to
update its internal index information.
The method used to update indexes will vary from storage engine
to storage engine, depending on the method used to store the
index.
In general, the storage engine will have to use row information
passed in functions such as
write_row()
,
delete_row()
,
and
update_row()
in combination with index information for the table to determine
what index data needs to be modified, and make the needed
changes.
The method of associating an index with its row will depend on
your storage approach. The BerkeleyDB
storage
engine stores the primary key of the row in the index while
other storage engines often store the row offset.