Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Reference Index

Indexes

Scroll Prev Top Next More

An index provides a pointer to the location of a column value in each row of a table, which allows R:BASE to search for rows of data much faster than searching rows sequentially. In general, R:BASE processes an operation that contains an indexed column faster than it processes one without.

 

The R:BASE index is similar to an index in a book; both indexes allow you to find information faster. Instead of searching through a book page by page, you can look up the topic in the index and find the exact page number of the topic. Similarly, you can apply indexes to columns so that R:BASE finds data faster.

 

When you apply an index to a column, R:BASE records the location of every value in that column. Then, when you look for or sort information in the column, R:BASE uses the index to find the rows you need quickly. For example, you want to list the bonuses that employee 102 earned; if the EmpID column in the SalesBonus table is indexed, R:BASE finds and searches that column faster. Indexes are most useful when you have tables with many rows.

 

This means that by indexing the appropriate columns, you can speed up your applications. Processes that formerly took 20 minutes or more may be completed in only a few seconds. An index on an R:BASE column speeds up access to a row of data in much the same way that an index in a book speeds up access to a page.

 

To understand how indexes increase processing speed, it's helpful to know how R:BASE stores a database. An R:BASE database consists of four files; each file has a different file extension - RX1, RX2, RX3, and RX4 for R:BASE 11. File 1 contains the definition of the database structure; file 2 contains the data in the database; file 3 contains the indexes to the data stored in file 2, and file 4 contains the large binary object data (LOB). LOBs include graphic files or large text data. R:BASE also stores forms, reports, and labels as LOBs in File 4.

 

When you include an indexed column in a WHERE clause, R:BASE uses the index in file 3 to find the location of each row in the table in file 2. Without an indexed column, R:BASE must sequentially search each row in that table in file 2 to find the data. By sorting an index list, you give R:BASE nearly instantaneous access to the specific index reference to a column name.

 

An indexed column improves the performance of the following commands, clauses, or operations:

 

CREATE VIEW

DELETE DUPLICATES

INTERSECT

JOIN

Lookups in forms or reports

PROJECT

RULES

SELECT (when it includes a WHERE clause)

SUBTRACT

UNION

VIEWS

WHERE...