Zendesk interview question

How would you optimise a slow SQL query?