Sybase 12.4.2 Server User Manual


 
Indexing tips
452
Operating systems use two different methods to allocate memory to disk cache:
fixed and dynamic. A preset amount of memory is used in a fixed allocation;
usually a 10–15 percent memory allocation is set aside. The operating system
usually manages this workspace using a LRU (least recently used) algorithm.
For a dynamic allocation, the operating system determines the disk cache
allocation as it is running. The goal is to keep as much memory in active use as
possible, balancing the demand for real memory against the need for data from
disk.
Using RAM disk
When RAM disk is implemented, the operating system views a portion of
memory as a disk drive. Disk operations involving RAM disk are very fast.
When files are placed on RAM disk, the performance of processes using those
files can improve dramatically. Primary candidates for RAM disks are
programs and temporary files.
Warning! This is not recommended for database files or transaction log files.
Database integrity may be compromised if these files are placed on RAM disk.
Indexing tips
The following sections give some tips for selecting and managing indexes. See
Chapter 4, “Adaptive Server IQ Indexes” for more information on these topics.
Picking the right index type
It is important to pick the correct index type for your column data. Adaptive
Server IQ provides some indexes automatically—a default index on all
columns that optimizes projections, and an
HG index for UNIQUE and single-
column
PRIMARY KEY columns. While these indexes are useful for some
purposes, you need other indexes to process certain queries as quickly as
possible. Adaptive Server IQ chooses the best index type for you when there
are multiple index types for a column.