Use a lightweight call for getting query information

Use a lightweight call to get the query information for the ui.