54
My SQL query is running very slow on a large table (millions of rows). The query:
SELECT * FROM orders
WHERE customer_id = 12345
AND created_at > '2024-01-01'
ORDER BY created_at DESC;What steps should I take to optimize this? How do I use EXPLAIN to analyze queries?