How can I enable automatic adaptive query preparing and caching?
Automatic, adaptive query preparing and caching is on by default. The default timeout value for cached queries is 60 seconds. If you create and release a query with the same SQL twice or more in 60 seconds, the second and subsequent queries (which will really be the same, cached, query object) will automatically be prepared. Likewise, if you execute the same SQL through the same query object within one minute, the second and subsequent executions will be prepared. You can change the query preparing and caching timeout in the profile string using the “vdbQueryTimeout” parameter, or by setting the Timeout property on individual query objects. Setting the timeout to zero disables automatic query preparing and caching.