Try OpenEdge Now
skip to main content
Debugging and Troubleshooting
Troubleshooting Resources : Log Entry Types Detail : Query information logging : Query plan
Query plan
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 QUERY statement
*For static PRESELECT and FOR statements, this is the top of the FOR or REPEAT/DO PRESELECT block.
*Query ID, the query's unique identifier.
*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 FOR statement, a static PRESELECT statement, a statically opened query, or dynamically opened query.
*For dynamically opened queries, the PREPARE-STRING.
*When the query was prepared:
*For FOR and static PRESELECT statements, 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".
*Whether the client is performing sorting.
*Whether this is a SCROLLING query, and whether it uses INDEXED-REPOSITION.
*Table and index information for each table used in the query. The index information that query information logging provides, such as the INDEX-INFORMATION attribute of the query object handle, is already available within ABL. To get more complete index information, use COMPILE XREF. For more information on indices, see Identifying indices.
*Whether the query uses PRESELECT. Using the PRESELECT keyword in a dynamically opened query has the same effect as the static PRESELECT, 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 FOR statement, after the top of the FOR statement block executes
*On a statically opened query, after the OPEN QUERY statement executes
*On a dynamically opened query, after the QUERY-PREPARE() method of the query handle executes
*On the static PRESELECT statement, after the top of the REPEAT | DO PRESELECT block executes
* Identifying indices