Debugging long running queries using callback
How to sort these logs by their duration of execution if you'd like them ordered from longest to shortest, so that the longest running queries are easier to locate:
Another option if you're worried about memory usage with collecting query logs, is listening for the "QueryExecuted" event:
Categories: Category 1