Monitor Individual Query Duration

I’d like to see how individual query duration is changing over time as our number of series grows. I already have looked at queryDurationNs but it seems like it doesn’t quite give me what I need based on:

The queryDurationNs statistic tracks the cumulative wall time, in nanoseconds, of every query executed. If one query took 1000 ns from start to finish, and another query took 500 ns from start to finish and ran before the first query finished, the statistic would increase by 1500.

This seems to muddle multiple query results together.

Would there be a recommended approach for this?

Bump! Any ideas would be appreciated. :wink:

It may not be the correct approach but these queries are also logged under /var/log/messages. You can give it a try but it will vary based on your setup.

Found the answer in an older post: Measure Query Execution Time

1 Like