Open topic with navigation
A pseudo table generated to show long running queries that have completed. (Currently running queries would be visible in
SYSTEM.CONNECTIONS - see CONNECTIONS System Table Description.)
SYSTEM.QUERYSTATS is also referred to as the Slow Query Log. By default, the ten slowest queries that took more than ten seconds to execute are stored in
SYSTEM.QUERYSTATS. These defaults are configurable with the
MIN_QUERY_TIME settings, respectively, in
SYSTEM.PROPERTIES (see PROPERTIES System Table Description). See Improving Query Performance for more information.
The fields in
SYSTEM.QUERYSTATS are very similar to the fields in
|SQLSTRING||string||The SQL statement that ran slowly.|
|RUNTIME||bigint||The duration of the statement execution specified in microseconds|
|USER||string||The SQL user for the database connection.|
|SCHEMA||string||The current SQL schema for the connection at the time of invocation of the slow query.|
|NUMPARAM||integer||The number of SQL parameters specified in the query. This is 0 if no parameters were specified.|
A string representing the parameters specified in the query. The string representing each parameter is of the format:
The number of the parameter starting at 0
The type of the variable, i.e. integer, string, etc.
The value passed in to the parameter.
Each parameter string is separated by a space.
NUMPARAM PARAMS --------- ---------------------------- 2 0/string/'hello' 1/integer/3
|NODEID||integer||A unique identifier specifying to which NuoDB transaction engine the slow query's client was connected.|
|NROWS||integer||The number of rows in the result set returned by the slow query, if any.|
|TIMESTAMP||string||The timestamp when the slow query began.|