Write query statistics on-demand
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
You can write the currently accumulated query information logging
statistics on a query to the log before the query completes, by
calling the DUMP-LOGGING-NOW( ) method
of the query object handle.
When you call DUMP-LOGGING-NOW( ) for
a pre-pass query, OpenEdge writes the second set of statistics
to the log. OpenEdge writes the first set after it builds the
result-list. For more information, see Query statistics for pre-pass queries.
The DUMP-LOGGING-NOW( ) method returns TRUE if OpenEdge successfully
writes the statistics to the log file; FALSE otherwise.
Logging will fail, for example, if query information logging is
turned off (for the individual query or in general), or if the query
started before query information logging was turned on.
The syntax for the DUMP-LOGGING-NOW( ) method
is:
|
The DUMP-LOGGING-NOW() method takes an optional
logical argument that, if set to TRUE, resets the query’s
statistics to zero after writing to the log. FALSE is the
default. In either case, statistics continue to accumulate as the
query completes.
The following example writes to the log file after each result and resets the accumulated values:
|