Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » Creating and Configuring UltraLite Databases » Choosing creation-time database properties for UltraLite

UltraLite decimal point position considerations Next Page

UltraLite page size considerations


The unit of storage within a database is known as a page, and all database input and output operations are always carried out a page at a time. UltraLite allocates a page to hold either:

If you are encrypting your database, UltraLite encrypts the data at the page level.

Choosing an optimal page size

UltraLite databases are stored in pages, and all I/O operations are carried out a page at a time. For most applications, the UltraLite default page size of 4 KB is appropriate.

However, you can choose another size if your database deployment requires it. Just remember that the page size you choose can affect the performance or size of the database. The typical rule of thumb is that larger databases usually benefit from a larger page size, because smaller pages hold less information and may force less efficient use of space—particularly if you insert rows that are slightly more than half a page in size:

However, there are instances when a smaller page size is in order. For example, small page sizes allow UltraLite to run with fewer resources because it can store more pages in a cache of the same size. Small pages are particularly useful if your database must run on small devices with limited memory. They can also help in situations when you use your database primarily to retrieve small pieces of information from random locations.

Verifying page integrity with checksums

You can check the validity of the pages stored to disk, flash, or memory by setting the checksum_level database property. Depending on the level you choose, UltraLite calculates then records a checksum for each database page, before it writes the page to storage. See UltraLite checksum_level property.

If the calculated checksum does not match the stored checksum for a page read from storage, the page has been modified or became corrupted during the storage/retrieval of the page. If a checksum verification fails, UltraLite stops the database and reports fatal error. This error cannot be corrected; you must re-create your UltraLite database and report the database failure to iAnywhere.

See also