Baidu interview question

How do you find and optimize slow queries?