""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   INDEXED COMPUTED COLUMNS SPEED SEARCHES
   """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   PRODUCT   :  R:BASE                  VERSION      :  3.1
   CATEGORY  :  SPEED & PERFORMANCE     SUBCATEGORY  :  INDEXES
   """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   From Glenn E. Brown, a pilot and R:BASE application developer. You can
   reach him at 713-834-2341 during the day or at 713-360-5955 in the
   evening.
 
   I'm helping to create a complete computerized scheduling system that
   Continental Airlines will use on a Novell network to schedule flight
   simulators for pilot training. A simulator code (SCODE) in combination
   with a date (SDATE) uniquely identifies each row in the master table.
   To make WHERE clauses fast, I created the following indexed, computed
   INTEGER column (SINDEX) containing this expression:
 
   sindex = (JDATE(sdate) + (scode * 100000)) INTEGER
 
   The application prompts for a simulator code and date, which it puts
   in two variables - VSCODE (INTEGER) and VSDATE (DATE). Then to quickly
   find the row, the application uses the following code (replace
   "command" with any command that uses a WHERE clause):
 
   SET VAR vsindex = (JDATE(.vsdate) + (.vscode * 100000))
   command ... WHERE sindex = .vsindex
 
   I tested this using 200 rows and found it twice as fast as this
   alternative:
 
   command ... WHERE scode = .vscode AND sdate = .vsdate
 
   The more rows you have, the greater the efficiency.