Have you enabled and looked at the slow query log?
https://dev.mysql.com/doc/refman/5.7/en/log-destinations.html
Here's a broad approach: https://coderpad.io/blog/development/optimize-query-performance-mysql/
npub15wawnk00h6gfnwpkvx7p74cel8uy99tl9z6mdyhtt7lk2tcvptxq2rezxc (npub15wa…ezxc)