adsquare Interview Question

How do you optimize and check SQL queries