Optimizing SQL Server queries by changing SQL query hint option
The performance of SQL server queries can be optimized by changing the SQL query hint option. This option, FAST (1), is enabled by default on SQL Server queries generated by the 4GL code.
The default behavior of FAST (1) can be changed by the Administrator in order to increase or nullify its effect on the performance of SQL Server queries. This can be done by modifying two global Sage X3 variables:
-
SQLOPTMIZ: If this parameter is set to "Yes", the FAST option becomes customizable.
-
SQLOPTNB: This parameter can be set to 0 or any integer above 0.
-
If its set to 0, the FAST option is fully disabled.
-
If its set to any integer above 0, the FAST value will correspond to the value (n) of this parameter - FAST (n).
-
The behavior of FAST (1) can also be modified by a developer in a 4GL script to use in a specific query only.