Photo by Caspar Camille Rubin on Unsplash
Network latency can be more of an issue in production than in development, and your queries should allow for that.
Transactions are intended primarily to improve data integrity, but they can also improve performance when used appropriately
The DATEDIFF function in SQL can be slow. Replacing it with CURDATE can often help performance on complex queries.