Pergunta de entrevista da empresa Lightspeed

How do you identify performance bottlenecks in a query, and what improvements would you make?