Glovo interview question

How can you optimize a Query?