ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / HFSQL properties
  • Retrieving the records
  • CtCacheSize property support
  • hQueryWithoutCorrection constant
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
CtCacheSize (Property)
In french: CxTailleCache
OLE DBNative Connectors (Native Accesses)Available only with these kinds of connection
The CtCacheSize property is used to determine and change the maximum number of records that can be stored in the cache of the Native MySQL Connector.
Remark: The cache size specified with the CtCacheSize property is ignored if it was specified in the optional information of HDescribeConnection or HOpenConnection.
Managing the cache: operating mode
Each time an external database is accessed, the retrieved records are stored in the cache of the Native Connector used before being transmitted to the client computer.
The cache of a Native Connector can only contain a limited number of records. If the number of records to retrieve is greater than the maximum number of records defined for the cache, the records are retrieved in batches.
The maximum number of records that can be stored in the cache corresponds to the size of the cache.
For example, if the cache size of the Native Connector is equal to 10, the cache will be filled 3 times when executing a query that selects 24 records:
  • 10 records.
  • 10 records.
  • 4 records.
Example
// Change the cache size of the Native MySQL Connector used by MyConnection
MyConnection.CtCacheSize = 450
Syntax

Determining the cache size of the Native MySQL Connector Hide the details

<Cache size> = <Connection name>.CtCacheSize
<Cache size>: Integer
Cache size of the Native MySQL Connector.
If this parameter corresponds to:
  • -2: the cache size is the default size (100 for the Native MySQL Connector).
  • -1: the cache size is unlimited.
  • 0: the cache stores no record. No record is retrieved.
<Connection name>: Character string
Name of the connection used. This name was defined in the data model editor, or with HDescribeConnection or HOpenConnection.

Changing the cache size of the Native MySQL Connector Hide the details

<Connection name>.CtCacheSize = <Cache size>
<Connection name>: Character string
Name of the connection used. This name was defined in the data model editor, or with HDescribeConnection or HOpenConnection.
<Cache size>: Integer
New cache size of the Native MySQL Connector.
If this parameter corresponds to:
  • -2: the cache size will be the default size (100 for the Native MySQL Connector).
  • -1: the cache size will be unlimited.
  • 0: the cache will store no record. No record will be retrieved.
Remarks

Retrieving the records

The speed at which the entire set of records is retrieved is proportional to the cache size: the larger the cache size, the faster the records are retrieved.
However, the smaller the cache size, the faster the first record will be read.
Caution: The memory used by the cache is proportional to the cache size.

CtCacheSize property support

The CtCacheSize property is supported only by the Native MySQL Connector.
Other Native Connectors do not support the CtCacheSize property. In this case, the use of this property will be ignored and no error will be generated.

hQueryWithoutCorrection constant

If the query is executed without checking the SQL code (hQueryWithoutCorrection constant), the cache will have an unlimited size and cannot be modified with the CtCacheSize property.
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help