Although explicitly adjusting the cache size is not required, you typically want to adjust the cache size when your UltraLite database application is requested to reduce its memory usage by the operating system on mobile devices.
UltraLite database cache sizes increase dynamically in response to data operations and as available device memory allows within the parameters you specify. Normally you do not need to specify any parameters. If your database is large (400 MB for instance), you may want to specify the CACHE_MAX_SIZE parameter to raise the maximum limit beyond the default. UltraLite allocates some data structures based on the maximum cache size, so the default is not extremely large: you must explicitly request a large maximum to incur this extra memory overhead. There is no benefit to specifying a maximum cache size that is much larger than your maximum actual database file size.
UltraLite does not shrink the cache automatically. The database cache size can only be controlled explicitly in your application with the cache_allocation database option. In response to a low memory event raised by the operating system, adjust the cache_allocation database option after connecting to the database.
Dynamic cache sizing is not supported by UltraLite Java edition databases. For more information about UltraLite Java edition database cache sizes, see UltraLite Java edition database cache sizes.
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|