Queries

On this Page
Docs Menu

The Queries page lists information about the last 50 queries that Looker has submitted to your database. If you’d like to see information about queries older than that, try the Usage section of Looker.

Basic Query Information

Column Definition
Time The start time of the query, displayed in your application timezone
Status The status of the query, which can include:
  • Cache: Looker returned the results from its cache, instead of running a duplicate query against the database
  • Complete: The query completed successfully
  • Error: The query wasn’t able to complete successfully because an error occurred, the details of which can be found by clicking the Details button
  • Canceled: The query was cancelled by Looker or the user
  • Waiting for PDT: The query needs to wait for a persistent derived table to be built before it can be executed
  • Building PDT: A persistent derived table is in the process of being built
  • Queued: The query is waiting to be executed because too many queries are already in progress (queries can be limited by Looker in your connection setup or your database)
  • Running: The query is in the process of being run
  • Unknown: Looker wasn’t able to determine what happened with this query
Connection The Looker connection under which this query was run
User The user who ran this query, if that can be determined. Some queries are not executed by a specific user, such as when Looker creates a persistent derived table, or when an unknown user accesses a public Look.
Source The source of the query in Looker, such as the Explore page or the SQL Runner. If possible, a link to saved Look, or the query ID along with the name of the model and explore, is also displayed. Some queries will not have additional information, such as those run in the SQL Runner.
Runtime The length of time it took to run the query
Details Button See below for additional explanation

The Details Button

Clicking the Details button to the right of any query will bring up additional information about that query. The pop-up includes an Info section and a SQL section, which can be accessed by clicking those buttons in the upper left. The SQL section will show you the raw SQL that was executed against the database. The Info section includes the following information:

Section Definition
History ID The history ID of the query, if available.
Status The status of the query, as described above
Connection The Looker connection under which this query was run
User The user who ran this query, if that can be determined. Some queries are not executed by a specific user, such as when Looker creates a persistent derived table, or when an unknown user accesses a public Look.
Source The source of the query in Looker, such as the Explore page or the SQL Runner. If possible, additional information is displayed such as a link to the saved Look, the query ID, model name, explore name, fields selected, etc.
Start Time The start time of the query, displayed in your application timezone
End Time The finish time of the query, displayed in your application timezone
Runtime The length of time it took to run the query

Killing a Query

Looker will automatically stop a query that is still running when you close the browser tab in which the query is running. You can also stop a query that is running from the Queries page. Any query that is still running shows a Stop button to the right of the query. Click Stop to kill the query.

Looker’s ability to provide query killing depends on the database dialect’s ability to support this functionality. The list below shows which dialects support query killing in the most recent Looker release:

Still have questions?
Go to Discourse - or - Email Support
Top