When RUNTIMESTATISTICS is turned on for a connection, Derby maintains information about the execution plan for each statement executed within the connection (except for COMMIT) until the attribute is turned off.

For the most recently executed query, RUNTIMESTATISTICS returns information about:
The exact details presented, as well as the format of presentation, can change. There are two techniques for retrieving the RUNTIMESTATISTICS information:
Related concepts
How you use the XPLAIN style
Analyzing the information
Related tasks
How you use the RUNTIMESTATISTICS attribute