Long completed queries or Slow query

{question}

How to find which queries had a long execution time in NuoDB?

{question}

{answer}

The following query shows long running queries that have completed, here for example we check for queries that ran for more than 60 seconds:

select * from system.querystats where RUNTIME>60000000;

SQLSTRING COUNT RUNTIME USER SCHEMA NUMPARAM PARAMS NODEID NROWS TIMESTAMP EXPLAIN
------------------------------- ------ ----------- -------------- ------- --------- ------- ------- ------ -------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

update test set a=10 where a=2; 7 22987715866 ENOVIADBANUODB USER 0 4 0 2017-01-04 20:30:16.974931 Update
List
Assign
Field USER.TEST.A (0)
"10" (integer)
LockRows(IsolationLevelForUpdate)
Boolean sieve
Eql
Field USER.TEST.A (0)
"2" (integer)
Exhaustive USER.TEST (0) [cost: 51.00, rows: 17.00]

 

More information and examples can be found here.

Note: this information is since the last database restart.

{answer}

Have more questions? Submit a request

Comments