Zanda Health interview question

How would you go about optimising a slow db query