UltraLite User's Guide
The Embedded SQL Interface
Fetching data
Although some aspects of UltraLite applications are optimized automatically, you can improve the performance of your applications using the following techniques.
add an index If you frequently retrieve information in a particular order, consider adding an index to your reference database. Primary keys are automatically indexed, but other columns are not. Particularly on slow devices, an index can improve performance dramatically.
add representative data The Adaptive Server Anywhere optimizer automatically optimizes the performance of your queries. It chooses access plans using the information present in your reference database. To improve application performance, fill your reference database with data that is representative in size and distribution of the data you expect your application will hold once it is deployed.