The Queries page lists information about the last 50 queries that Looker 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 time zone. |
Status | The status of the query, which can include:
|
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. If the query is currently running, the runtime will show how long the query has been running. For queries that were run previously, the runtime will also show an estimate of how much time the query will take to finish running. The estimate is based on the duration of the last run of the query, and will say something like, “of about 2s”. |
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 Query Details pop-up includes the following:
- An Info section that includes details about the query (see the table below).
- A SQL section that shows the raw SQL that was executed against the database. Context Comments will not appear in the Query Details information. To prevent comments from affecting query caching, Looker adds the context comments to outgoing SQL commands right before the SQL is sent to the database.
- An Open in SQL Runner link that will open the query in SQL Runner.
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 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, and so on. |
Start Time | The start time of the query, displayed in your application time zone. |
End Time | The finish time of the query, displayed in your application time zone. |
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 kill a query 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: