Couple weeks ago we started having performance issues with JIRA Software and Service Desk when actions (saving issue after edit, issue transitions even displaying ticket) can take up to 10-20 seconds in peak times.
When investigating through JaveMelody plugin we noticed that the biggest culprit is one specific select in our SQL database:
SELECT DISTINCT ID FROM dbo.rundetails WHERE JOB_ID=?
This is a statistic for last month:

Does anybody know if it's associated with specific action in JIRA or if it's possible to find out what could cause it to take longer to execute over time?
The mean time of the select started to take longer about 7 weeks ago and it's continually rising.
Thanks.