Please enable JavaScript to view this site.

A-Shell Reference

Although ISAM-A is the preferred file structure for use in A-Shell, and has been for many years, ISAM 1.x continues to be fully supported.

In August 2008, A-Shell build 1122, a major performance-related update of ISAM was undertaken to meet the needs of a new client. This "new ISAM" is known as ISAM 1.1.

For large ISAM files, you can achieve much better performance by increasing the IDX block size and/or number of index levels from the previous fixed values of 512 and 3. The ISMBLD and ISMDMP utilities, updated to ISAM 1.1, allow access to the new capability.

To take advantage of the new capabilities, you must dump the file and build a new one with the ISMBLD switches /B:# and /L:#.

Following are descriptions of how the ISMBLD.LIT switches may be used to improve performance. See the following topic for information on the very important /L:# switch, and ISMBLD.LIT for a full listing of the switches.

IDX Blocks (/B:####)

Increasing the IDX block size helps by increasing the number of keys that can be scanned per disk operation, reducing the number of levels needed, and reducing the number of block splits during adding, all at the cost of more bytes being transferred to/from the disk per node accessed. For most modern disks and computers, the tradeoff works well, at least up to 2048. Our recommendation is to choose a block size 20-50 times larger than the key size.

Memory Mapping (/MI and /MR)

Under Unix, memory mapping the IDX, either fully (/MI) or just the first few blocks at the top of the tree (/MR), affects only the ISMBLD loading operation. In general memory mapping results in a very significant performance increase, when the total file size is small compared to the available system memory (else it may adversely affect the cache efficiency). /MR only maps a handful of blocks, so there is no danger of it affecting cache efficiency, but on the other hand, the overall benefit is smaller. If you want to get this same effect in your application, you'll need to use Xcall ASFLAG.

Memory mapping does not have much, if any, benefit under Windows.

Fast Load (/F)

Like /MI and /MR, this also only affects the load operation. It speeds the process somewhat, by eliminating the initial key lookup operation that otherwise is performed to check whether the record being loaded is a duplicate. If you know that your load file is clean, this can shave about 20% off the load time. But the penalty is that if there is a duplicate key, instead of skipping the record (as in the normal case), the load will abort with an error.

Auto-Expansion

Beginning with A-Shell 1344 of March 2013, the number of blocks added during auto-expansion is limited to 8 MB of data or 2000 index blocks. For very large files, this makes the auto-expansion process more seamless.

Real-World Analysis

An A-Shell user asked a question about ISAM performance, and MicroSabio provided an in-depth answer that covers a lot of ground. See the A-Shell forum discussion "ISAM performance after deletions."

See Also

Subtopics

IDX LEVELS (/L:#)