MarkLogic 9.0.8.2
We would like to see the long running queries on MarkLogic App Server.
We were looking at documentation and this link
This knowledgeable talks about running "appserver-status.xqy" in qconsole to generate report on queries running currently.
What we need to know is list of long running queries in the last month and then investigate on how we can improve it.
Is there any way we can extract these information?
The data from that script is not persisted, so there would need to be a mechanism to schedule it to run periodically, and persist the data. You could alter the script, or you upgrade to a more recent release and use Request Monitoring.
The process to enable Request Monitoring is in the documentation, and once it's enabled, the requests will be logged in the app server RequestMonitoring log.