""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   SPEED BY DESIGN
   """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   PRODUCT   :  R:BASE                  VERSION      :  3.1
   CATEGORY  :  PERFORMANCE             SUBCATEGORY  :  SPEED
   """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 
   Get top performance out of your R:BASE applications by building speed
   into your databases and programs.
 
 
   Efficient Memory System
   """""""""""""""""""""""
   Read MEMORY.TXT, a file that came with your R:BASE program, to learn
   how to design an efficient memory management system. For example, to
   take full advantage of R:BASE 3.1's reduced memory requirements, use
   the memory that lies above the DOS limit of 640K (high memory). If you
   have a memory manager installed, R:BASE will use it. If you don't, use
   the memory manager HIMEM.SYS that's supplied with R:BASE. Learn what
   to do by reading MEMORY.TXT.
 
   DOS programs like R:BASE can't use extended or expanded RAM directly,
   so it's important to free up as much conventional memory as possible
   by using RVMX and moving drivers to high memory. If you have expanded
   memory, set the DOS environment variable RTVMCONV by using this DOS
   command:
 
     SET RTVMCONV=1,640
 
 
   Upgrade EXPRESS Enhancements
   """""""""""""""""""""""""""""
   Subscribe to Upgrade EXPRESS to ensure that you always have the latest
   version of R:BASE. Each new release has quality improvements. For
   example, the first release of Upgrade EXPRESS (3.1A) has four major
   speed improvements: an optimized query engine, faster report printing,
   an IHASH function to speed up searching on indexed TEXT columns, and
   enhanced commands that provide more productivity with less code.
 
 
   Efficient Databases & Indexes
   """""""""""""""""""""""""""""
   A good relational database design is crucial to good performance.
   Refer to your manuals, previous R:BASE EXCHANGE (or Microrim ONLINE)
   issues, and outside sources to learn more about how to design good
   relational databases. Here are two tips: use the DOUBLE data type
   instead of NUMERIC, and keep names short (eight characters or less)
   and early-on unique. For example, put the number in the second
   position (V1TOT...V9TOT) instead of the last position (VTOT1...VTOT9).
 
   If you have Upgrade EXPRESS (R:BASE 3.1A or higher), use the new IHASH
   function to improve the search speed on indexed TEXT columns where the
   first two characters are not unique. For example, on part numbers (AB-
   102, AB-301, and so on).
 
 
   Less Code, Smart EEPs, & SQL
   """"""""""""""""""""""""""""
   Add speed by reducing the quantity of code. Often you can do what you
   need to do in SQL with fewer commands. For example, Union Carbide
   converted a very large (50,000 lines of code) safety tracking
   application from R:BASE 2.11 to R:BASE 3.1, and now the R:BASE 3.1
   application runs three times faster overall than did the 2.11
   application. The most significant factor was full SQL implementation.
   Often a single SELECT command can replace an entire program--
   especially when using a SELECT clause in the INSERT command.
 
   Make entry/exit procedures (EEPs) smart. For examples of smart EEPs,
   look at "Put More Pop in Your Pop-ups" and "Add a Value to a Pop-up
   Menu." Also look at "Browse or Edit Old Rows While Entering New Rows
   in a Form" to see how to make an EEP execute only if the user presses
   [F2].
 
   Modify your programs to take advantage of new features in R:BASE 3.1A
 
   Check your DECLARE CURSOR Structures. An incorrect structure can take
   longer to execute even though it works. For example, never put a
   DECLARE CURSOR statement inside a WHILE loop; use the OPEN command in
   the WHILE loop but put the DECLARE CURSOR command outside the loop.
   See examples of the correct structure in "Row by Row in R:BASE 3.0
   Using DECLARE CURSOR" in the March/April 1990 issue or "An R:BASE
   Expert System" in the March/April 1991 issue.
 
   Enclose the entire WHERE clause in parentheses. This will help R:BASE
   skip a step in interpreting the command and will improve performance
   over the long haul.
 
 
   Innovative Solutions
   """"""""""""""""""""
   Develop innovative solutions, experiment, and be flexible. For
   example, if you need a simple form without menus, it might be better
   to lay down a background screen with DISPLAY, and then use FILLIN to
   open a portal to a table instead of using an R:BASE form. To learn
   how, see "Open a Data Entry Portal in a Form to Load Another Table" in
   the March/April 1991 issue or "Set Date & Time to Start Program" in
   this issue of Microrim ONLINE.
 
   Combine all your software programs and R:BASE applications and put
   them on the R:BASE Application menu to save you time and trouble. See
   "Run All Your Software from an R:BASE Menu" for an example
   implementation.
 
   Find two ways to do the same thing and then experiment to see which
   one is faster. By staying flexible and being willing to try new things
   and adapt to new ways of thinking, you'll be able to modernize your
   application and database designs to add the speed you need. Invest the
   time and effort it takes to learn and apply new programming techniques
   like SQL, new R:BASE program features, and new memory power, and
   you'll be rewarded with faster speed.