chart query tuning