Rushmore Requires Open Indexes in Order to Operate (114781)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft FoxPro for Windows 2.5
  • Microsoft FoxPro for Windows 2.5a
  • Microsoft FoxPro for Windows 2.5b
  • Microsoft FoxPro for MS-DOS 2.0
  • Microsoft FoxPro for MS-DOS 2.5
  • Microsoft FoxPro for MS-DOS 2.5a
  • Microsoft FoxPro for MS-DOS 2.5b
  • Microsoft FoxPro for Macintosh 2.5b
  • Microsoft FoxPro for Macintosh 2.5c
  • Microsoft FoxPro for Macintosh 2.6a

This article was previously published under Q114781

SUMMARY

FoxPro's SQL - SELECT command automatically opens any tables called in the FROM clause of the command. If any of these tables have an associated structural .CDX, that .CDX file is automatically opened. This is the standard behavior of a structural .CDX. However, any nonstructural .CDX files or .IDX files associated with the tables in the projection list must be explicitly activated in order for Rushmore to use them.

MORE INFORMATION

Rushmore requires indexes in order to operate. If no suitable index is available, FoxPro will create an index. Creating the index will take some additional time, which reduces the benefits of Rushmore's query speed.

To ensure the best performance possible when you use tables with nonstructural .CDX and .IDX indexes, open the tables and related indexes prior to issuing the SELECT command. FoxPro has no way to associate and automatically open .IDX files or nonstructural .CDX files for Rushmore.

Steps to Demonstrate Behavior

To see how indexes affect Rushmore's performance, do the following:

  1. Issue the following commands in the Command window:
          USE customer
          COPY TO testrush
          USE testrush
          APPEND FROM customer   && re-execute this command until ;
                                    there are several thousand ;
                                    records in the testrush table. ;
                                    The point is simply to create ;
                                    a file large enough so that the ;
                                    timing difference is noticeable.
    
          INDEX ON company TO testrush
          CLOSE ALL
    							
  2. Issue the following SELECT command in the Command window:
          SELECT * FROM testrush WHERE company = "A"
    							
    Note the query time in the status bar.
  3. Close all the tables and run the query with both TESTRUSH.DBF and TESTRUSH.IDX active:
          CLOSE ALL
          USE testrush INDEX testrush
          SELECT * FROM testrush WHERE company = "A"
    							
Note the query time in the status bar.

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:KB114781