Search methods

The tableBASE software offers you a variety of search methods that are optimized for performance, table organization, and in-memory use:

The search is applied to the Index and the Index then points to the appropriate row of the Data Table.

Queued sequential search

This search method is executed by progressing serially through the Index and comparing the search key to each Index key until a row is found. Subsequent searches begin where the last row was compared, if the search key is farther along in the Index sequence. If the key of the next row examined is too high (or too low for descending sequential Indexes), the search resets to start from the beginning of the Index.

Queued sequential searches are faster on partially-sequenced or mostly-sequenced data—for example, transaction matching in a master file type of update process.

The table organization must be ascending or descending Sequential.

Bounded binary search

The bounded binary search process compares the search key to the endpoints of an Index to determine if the search key is within the Index range. If the search key is not within the range, then the system returns a “not found” message. If the search key is within the range, then a binary search process is used to find the key position.

A bounded binary search is a fast technique for performing inserts into ordered data.

The table organization must be ascending or descending Sequential.

Search summary

Table 59 summarizes the valid combinations of table organizations and search methods allowed by tableBASE.

Table 59. Search summary

Table organization

Search methods

Queued sequential

Bounded binary

Binary

Serial

Hash

Sequential

Y Y Y

 

 

Descending sequential

Y Y Y

 

 

User-controlled sequence

 

 

 

Y

 

Random

 

 

 

Y

 

Hash

 

 

 

 

Y