Share via


SET OPTIMIZE Command

Enables or disables Rushmore Query Optimization.

SET OPTIMIZE ON | OFF

Parameters

  • ON
    (Default) Enables Rushmore optimization.

  • OFF
    Disables Rushmore optimization.

Remarks

Visual FoxPro uses a technology called Rushmore Query Optimization to optimize data retrieval. Table commands that support a FOR clause use Rushmore technology to enhance their performance. When you issue a command that is optimizable, Rushmore determines which records match the FOR criterion. The command is executed on records in the table that match the Rushmore recordset.

In rare cases, you should disable Rushmore optimization. If a command that benefits from Rushmore optimization modifies a query's index keys, the Rushmore recordset may become outdated. You can disable Rushmore optimization to ensure that you have the most current information from the table.

You can use SET OPTIMIZE to globally enable or disable Rushmore technology. Every command that uses Rushmore has a NOOPTIMIZE clause you can include to disable Rushmore optimization for the command.

For more information, see Using Rushmore Query Optimization to Speed Data Access.

Below are the commands whose performance is optimized by Rushmore:

Commands

 

AVERAGE

INDEX

BLANK

LABEL

BROWSE

LIST

CALCULATE

LOCATE

CHANGE

RECALL

COPY TO

REPLACE

COPY TO ARRAY

REPLACE FROM ARRAY

COUNT

REPORT

DELETE

SCAN

DISPLAY

SORT

EDIT

SUM

EXPORT

TOTAL

See Also

Concepts

Using Rushmore Query Optimization to Speed Data Access

Reference

INDEX Command

SET ORDER Command

SET Command Overview

Other Resources

Commands (Visual FoxPro)

Language Reference (Visual FoxPro)