Can you explain how you optimized database queries in your past projects and what tools you used to measure performance?

Technical