Query plan
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The query plan contains the following information about how OpenEdge extracts information for the query:
- Procedure name and line number where the query started:
- For dynamically opened queries, this is the
QUERY-PREPARE()method - For statically opened queries, this is the
OPEN QUERYstatement - For static
PRESELECTandFORstatements, this is the top of theFORorREPEAT/DO PRESELECTblock.
- For dynamically opened queries, this is the
- Query ID, the query's identifier.Note: A Query ID is used to group all the log entries for a given query between the time the query is open and then closed. The Query ID may remain the same for a given query if it’s opened multiple times, but that is not guaranteed. The Query ID is only guaranteed to be the same while the query is executing..
- For statically and dynamically opened queries, a string representation of the query handle, and the name of the query (if available).
- Whether the query is a
FORstatement, a staticPRESELECTstatement, a statically opened query, or dynamically opened query.- For a join performed on the server,
Server-side joinis written after the type.
- For a join performed on the server,
- For dynamically opened queries, the
PREPARE-STRING. - When the query was prepared:
- For
FORand staticPRESELECTstatements, and statically opened queries, this is at compile time. Query information logging will report "Prepared at Compile Time". - For dynamically opened queries, this is at run time. Query information logging will report "Prepared at Runtime".
- For
- Whether the client is performing sorting.
- Whether this is a
SCROLLINGquery, and whether it usesINDEXED-REPOSITION. - Table and index information for each table used in the query. The
index information that query information logging provides, such as the
INDEX-INFORMATIONattribute of the query object handle, is already available within ABL. To get more complete index information, useCOMPILE XREF. For more information on indices, see Identify indices. - Whether the query uses
PRESELECT. Using thePRESELECTkeyword in a dynamically opened query has the same effect as the staticPRESELECT, that is, it builds a preselected list of records. - The time it takes to prepare dynamically opened queries.
OpenEdge logs and collates query plan information at specific times, based on query type, as follows:
- On a
FORstatement, after the top of theFORstatement block executes - On a statically opened query, after the
OPEN QUERYstatement executes - On a dynamically opened query, after the
QUERY-PREPARE()method of the query handle executes - On the static
PRESELECTstatement, after the top of theREPEAT | DO PRESELECTblock executes