Simba Technologies
Simba Technologies

SimbaEngine X SDK 10.1.3
Developing Drivers for Data Stores Without SQL

Support for Indexes

If your data store supports indexes, the C++ SimbaSQL Engine enables you to use these indexes in your custom driver code. Using indexes improves the speed of data retrieval.


The Java version of the SQL Engine does not support indexes. You can build a custom JDBC driver that supports your data store's indexes by using the JNIDSI bridge to the C++ SimbaEngine X SDK.

SQL Engine uses indexes following ways:

  • Index-only scan

    If a single DSIExtIndex object contains the data for all needed columns, then the SQL Engine can scan only the index in order to retrieve data. Retrieving data from rows in the result set is not necessary. The SDK may use the index without using the indexing capability of the index. SimbaEngine SDK can also use the index for filtering or joining while performing an index-only scan.

  • Bookmark usage scan

    If a data source can use bookmarks, then a DSIExtIndex can be used to retrieve a set of bookmarks for rows in the parent table that satisfy a filter.

To control the use of index-only scans, set the property DSIEXT_DATAENGINE_PREFER_INDEX_ONLY_SCANS to Y. This tells the SQL Engine to attempt an index-only scan whenever possible. An index generally contains less data than the parent table, and therefore can be traversed more efficiently.

If scanning an index is slower than scanning a table, or for other design reasons, then set the DSIEXT_DATAENGINE_PREFER_INDEX_ONLY_SCANS property to the value N. When set to N, index-only scans are still performed if the scan satisfies one or more filters. If the DSIEXT_DATAENGINE_USE_DSII_INDEXES property is set to N, then the DSIEXT_DATAENGINE_PREFER_INDEX_ONLY_SCANS property is not used.

If you inherit from DSIExtSimpleResultSet, to enable the use of indexes you need only to implement GetBookmarkSize, GetBookmark and GotoBookmark in addition to your DSIExtIndex implementation.

Information on implementing indexes can be found in the section Implementing Indexes. See also to the SimbaEngine C++ API Reference for details on how to implement SimbaEngine usage of data store indexes.


Related Links

Sample Index Implementation