RAD Studio VCL Reference
|
Sends a query to the server for optimization prior to execution.
procedure Prepare;
__fastcall Prepare();
Call Prepare to have the remote database server allocate resources for the query and to perform additional optimizations. Calling Prepare before executing a query improves application performance.
A query is automatically prepared before being executed. A query that was automatically prepared will then be automatically unprepared after it executes. When a query will be executed a number of times, an application should always explicitly prepare the query to avoid multiple and unnecessary prepares and unprepares.
Preparing a query consumes some database resources, so it is good practice for an application to unprepare a query once it is done using it. The UnPrepare method unprepares a query.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|