ParentPay interview question

How do you identify and optimize slow SQL queries?