Pure Indexes

1 Introduction
2 Notes
3 Sequential Record Numbering

1 Introduction

Pure index files provide a method of managing key information without the overheads required for full data handling. They offer advantages in speed and storage requirements, but are necessarily limited in other ways.

Both isBuild and isbuild will create pure index files when passed a value of zero for the record length. The result is a single index (.idx) file - no data store (.dat) is created.

2 Notes

Pure index files consist of the primary index only - you may not add secondary indexes.

Only the fields pointed to by the key description will be stored and available for retrieval.

The current value of isrecnum will be stored on writes and updates, and will be returned on read.

This permits the application to store an arbitrary value, perhaps pointing to a related record in another isam file, or in some other record store, or perhaps a counter, or a timestamp, etc.

Record locking is not possible, and pure indexes may not be opened in autolock mode.

you cannot delete or rewrite by record number.

pure indexes cannot be rebuilt or repaired if damaged, so should not be used for critical data.

3 Sequential Record Numbering

Setting ISPURE to 1 in isconfig.h will insert a call to store a sequential value for isrecnum.

This will occur on all new inserts, across all existing pure indexes, on a global basis, and should probably not be changed if you are already using pure indexes for other purposes.

This method is based on a simple increment, and does not adjust for or reuse deleted record numbers, as with regular isam files.