SYS(3054) - Rushmore Optimization Level
Enables or disables display of Rushmore optimization levels for queries.
SYS(3054 [, 0 | 1 | 11 | 2 | 12] [, cMEMVAR])
Return Values
Character
Parameters
- 0
(Default) Disables the display of Rushmore optimization levels. - 1
Enables the display of the Rushmore filter optimization levels. - 11
Enables the display of Rushmore join optimization levels. - 2
Prints SQL statement with Rushmore filter statistics. - 12
Prints SQL statement with Rushmore join statistics. - cMEMVAR
Specifies an undeclared or declared PUBLIC or LOCAL memory variable in which to store the showplan information. If you have not declared cMEMVAR, Visual FoxPro creates it as a PRIVATE variable.
Remarks
SYS(3054) returns the current Rushmore optimization level setting as a character string to the active screen or to a memory variable.
The showplan output displays the table alias as reference for table name.
Use SYS(3054) to improve query performance by determining the extent to which the query is optimized by Rushmore technology.
Issue SYS(3054, 1) to display the Rushmore filter optimization level after a query is executed. The filter optimization level is displayed in the active window.
The following table lists the three levels of Rushmore optimization:
Optimization Level | Description |
---|---|
None | The query could not be optimized with Rushmore technology. |
Partial | Some expressions in the query could be optimized with Rushmore technology. The index tags used for Rushmore optimization are listed. |
Full | The query was fully optimized with Rushmore technology. The index tags used for Rushmore optimization are listed. |
If SYS(3054,1) indicates that a query could not be optimized or could be optimized only partially, you can modify the query to take advantage of Rushmore optimization.
Issue SYS(3054, 11) to display the Rushmore join optimization level after a query is executed. The optimization level is displayed in the active window.
Issue SYS(3054, 0) to stop display of the Rushmore optimization level after a query is executed.
For more information about Rushmore technology and optimizing queries, see Using Rushmore to Speed Data Access.
Example
The following code displays the Rushmore Optimization level after performing a query:
LOCAL cmemvar
=SYS(3054,11,"cmemvar")
SELECT * FROM HOME()+"labels.dbf"
? cmemvar
See Also
PUBLIC Command | LOCAL Command | PRIVATE Command | SELECT - SQL Command | Using Rushmore to Speed Data Access