Open dmitriim opened 5 years ago
Im gonna reopen this one, it may not be fixed by #92. This query should be improveable by removing the subquery and instead doing something like: SELECT * FROM {tool_lockstats_history} WHERE taskid = :taskid ORDER BY id DESC LIMIT 1
On big instances we have noticed that SQL from get_recent_history method takes a long time to run + puts some load on DB CPU.
We need to optimise this SQL