PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Differences between HOptimize and HOptimizeQuery
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Example
HOptimizeQuery(QRY_Customer, 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 (with or without quotes)
  • 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.
The query parameters can also be passed before HOptimizeQuery via the following 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.
The query parameters can also be passed before HOptimizeQuery via the following 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 the index sections required by the specified query, for all the data files used by the query. This function is used to optimize the queries.

Various

  • HOptimizeQuery immediately gives control back to the program and it is run in background task.
  • To avoid the risk of saturation, HOptimizeQuery should not be called on an important number of queries.
  • If an optimization is in progress during the call to HOptimizeQuery, the current optimization is automatically stopped.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Linux wd230hf.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment