Nagarro interview question

How to optimize query and performance tuning