Punch (CA) Interview Question

How would you optimize a slow SQL query in PostgreSQL?