Punch (CA) interview question

How would you optimize a slow SQL query in PostgreSQL?