Walmart Global Tech interview question

How would you optimize a database query that is running slow.