Walk us through a time you had to optimize a slow-running SQL query. What was the bottleneck, and how did you resolve it?