Query tuning for better performance.