...
- For all executed queries we should gather statistics. They should be grouped by SQL query and have at least min, max, avg time of execution; min, max, avg of IO operations (when IO stats are enabled); number of executions.
- Access to the query statistics should be provided through both JMX and system SQL view. For SQL views it could be very convenient to get specific information due to power of SQL, e.g. number of queries for last 2 hours.
- IO stats could be enabled/disabled for the given session through SQL commands, e.g. SET STATISTICS <ON|OFF>
- Security monitoring: For each query we should track who started query: subject id, application name/module/label
- Statistics kept on node locally, collected from other nodes only when needed
...
{"serverDuration": 84, "requestCorrelationId": "b10316406d232a77"}