Make getQueryInfo lightweight