Can you describe a time when you optimized a database query? What was your approach and how did you measure improvement?