MBO Indexes

Understand how to maximize index efficiency use in mobile applications.



Use the minimum number of indexes.



If findByPrimaryKey is not required to locate the MBO via the business key, disable generation.



If FindAll is not required, disable generation, except for MBOs with a low number of instances on the device.



Determine if an index is required for user-defined object queries.

Impact of Indexes on the Device

When performing updates, or during initial or large subsequent synchronizations, index maintenance is a significant performance consideration, especially on device platforms where all root index pages stay in memory. Even a small number of indexes impacts performance, even when they belong to tables that are synchronized. For a very small table, you may not need to use an index at all. When synchronization performance is slower than expected, evaluate how many indexes are deployed in the package.

Reducing Indexes

By default, two queries are generated for each MBO: findByPrimaryKey and FindAll. The primary key is the business key in the EIS. If the mobile application does not need to locate the MBO via its business key, disable generation of the findByPrimaryKey query. This is especially true for child MBOs that can navigate to the parent MBO and need not locate the parent via the primary key.



FindAll does not require any index as it scans through the table, instantiates, and returns all MBO instances as a list. Unless the number of MBO instances is small, the FindAll query is inefficient, and Sybase recommends that you disable its generation by unselecting the Generate FindAll query checkbox.



By default, developer-defined object queries create indexes. If the number of instances of the MBO is small, an index may not make much difference as far as performance, however, you should disable index creation for these object queries by unselecting the Create an index checkbox when synchronization performance is an issue.