PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Differences between HOptimize and HOptimizeQuery
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Optimizes the Select queries by using idle times when handling an application (period without processes). Optimizes the access to the indexes of HFSQL Classic data files. Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Example
HOptimizeQuery(REQ_Client, 34)
Syntax
<Result> = HOptimizeQuery(<Name or SQL Code of Query> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Boolean
  • True if the data file was optimized,
  • False if a problem occurred. HErrorInfo returns more details.
<Name or SQL Code of Query>: Character string
  • Logical name of the query used (Select query only).
  • SQL code of the query used (Select query only).
<Parameter 1>: Optional parameters (the type corresponds to the parameter type)
Values of the parameters expected by the query in order of initialization (visible in the query editor). Each parameter must correspond to the expected type. The different parameters are separated by a comma.
It is also possible to pass the query parameters before the HOptimizeQuery function using the notation <QueryName>.<ParameterName> = <Value>.
The parameters are ignored if "<Name or SQL Code of Query>" corresponds to the SQL code of the query used.
<Parameter N>: Optional parameters (the type corresponds to the parameter type)
Values of the parameters expected by the query in order of initialization (visible in the query editor). Each parameter must correspond to the expected type. The different parameters are separated by a comma.
It is also possible to pass the query parameters before the HOptimizeQuery function using the notation <QueryName>.<ParameterName> = <Value>.
The parameters are ignored if "<Name or SQL Code of Query>" corresponds to the SQL code of the query used.
Remarks

Differences between HOptimize and HOptimizeQuery

  • HOptimize loads the system cache with the entire file index. There is a risk of overloading the system caches if the data file is very large or if the application uses several large data files.
    To avoid the risk of saturation, HOptimize should not be called on an important number of data files or key items.
  • HOptimizeQuery loads the system caches with only the index parts needed for the specified query, for all data files used by the query. This function is used to optimize the queries.

Miscellaneous

  • The function HOptimizeQuery returns the hand immediately to the program and is executed as a task of Background.
  • To avoid saturation, avoid calling the HOptimizeQuery function on too many requests.
  • If an optimization is in progress when the HOptimizeQueryfunction is called, the current optimization is automatically stopped.
Business / UI classification: Business Logic
Component: wd270hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment