What is the value of innodb_buffer_pool_size
? (It should be about 70% of RAM.) How much RAM? What is the typical size of metadata ?
Please provide `SHOW TABLE STATUS LIKE 'invoice';`
` SELECT COUNT(*)
FROM invoice
WHERE issue_date BETWEEN '2025-01-01' AND '2025-07-30'
AND customer_id = 20
AND status BETWEEN 1 AND 7
AND workflow = 1
Together with
INDEX(customer_id, workflow, status, issue_date)
INDEX(customer_id, workflow, issue_date, status)