I should have added: there are indexes for these queries, and the slow queries show they are being used. So it’s not a simple table scan issue.
I should have added: there are indexes for these queries, and the slow queries show they are being used. So it’s not a simple table scan issue.