Defines the database page size in kilobytes.
{ulinit | ulload } -c --page_size=sizeK
1K, 2K, 4K, 8K, 16K
4K
The page size must be entered with a K or k after the digit, or, alternatively, the equivalent number of bytes (1024, 2048, 4096, 8192, or 16384).
UltraLite databases are stored in pages, and all I/O operations are carried out a page at a time. The page size you choose can affect the performance or size of the database.
If you use any value other than those listed, the size is changed to the next larger size. If you do not specify a unit, bytes are assumed.
If your platform has limited dynamic memory, consider using a smaller page size to limit the effect on synchronization memory requirements.
When choosing a page size, you should keep the following guidelines in mind:
Database size Larger databases usually benefit from a larger page size. Larger pages hold more information and therefore use space more effectively—particularly if you insert rows that are slightly more than half a page in size. The larger the page, the less page swapping that is required.
Number of rows Because a row (excluding BLOBs) must fit on a page, the page size determines how large the largest packed row can be, and how many rows you can store on each page. Sometimes reading one page to obtain the values of one row may have the side effect of loading the contents of the next few rows into memory.
Query types In general, smaller page sizes are likely to benefit queries that retrieve a relatively small number of rows from random locations. By contrast, larger pages tend to benefit queries that perform sequential table scans.
Cache size Large page sizes may require larger cache sizes. With dynamic cache sizing, UltraLite grows the cache as required.
Index entries Page size also affects indexes. The larger the database page, the more index entries it can hold.
Device memory Small pages are particularly useful if your database must run on small devices with limited memory. For example, 1 MB of memory can hold 1000 pages that are each 1 KB in size, but only 250 pages that are 4 KB in size.
You cannot change the page size of an existing database. Instead, you must create a new database.
From Sybase Central, you can set the page size in any wizard that creates a database. On the New Database Storage Settings page, click the appropriate byte value.
From a client application, set this parameter as one of the creation parameters for the create database method on the database manager class.
To set the page size of the database to 8 KB, specify page_size=8k or page_size=8192:
ulinit test.udb -a --page_size=8k |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |