Query count per render

reachbgk
Participant II

2 questions :

  1. I would like to get numbers around “query count per dashboard per dashboard render”
    I was able to go to the Usage section under the Admin panel and used the History explore to get query counts by dashboard per day. I would like to get to a “per render” level.
  2. Related to the above…how do I include LookMl dashboards as a source in the above query
0 8 467
8 REPLIES 8

Hmm, I’m not sure I understand 1. Wouldn’t that just always be equivalent to the # of tiles on a dashboard? Perhaps elaborating on what you mean by “Render” would be helpful.

re: including LookML dashboards, you’ll note there’s two different ID fields in the dashboard section: image
Both types are included by default, but if you’re filtering or want to return the dash IDs, make sure to use the “Inclusive” option.

reachbgk
Participant II

If a tile has a merged query, will that count as 1 query for that tile or show the count of the number of queries merged ?
Even if I were to assume one query per tile, I would have to open every single dashboard and count the number of tiles. I was looking for an automated way of getting the queries per render

You’re totally right, I hadn’t considered merged queries. That’ll count for the number of queries merged.

The “per render” query count is really just like saying "How many queries are on this dashboard? For that, you’ll want to abandon the history explore and instead turn to the dashboard explore, which can solve these questions.
This explore below should show # of queries by dashboard ID. I think a merge query will still be considered just a query by the count, so I included the # of source queries as well:

https://YOURINSTANCE.looker.com/explore/system__activity/dashboard?fields=dashboard.id,query.count,merge_query.count,merge_query_source_query.count&sorts=query.count+desc&limit=500&query_timezone=America%2FLos_Angeles&vis=%7B%7D&filter_config=%7B%7D&dynamic_fields=%5B%5D&origin=share-expanded

If you’re seeing strange discrepancies where the # of queries seems lower than the # of tiles, it’s probably be due to the fact that multiple tiles can have identical queries but different visualization configurations, making them appear different on the dashboard but only count as 1 backend query.

reachbgk
Participant II

Thank you Izzy. This is very helpful.
Is there any way to get the same for LookML dashboards ?

It’s kind of funky, but as far as I can tell system__activity excludes LookML dashboards while i__looker does not. If you change the model in that URL from system__activity to i__looker, you should be able to select the Dashboard ID (Inclusive) to include LookML dashboards as well.

For reference: system__activity is the successor of i__looker, so it’s almost exactly the same with just a few discrepancies like that one.

reachbgk
Participant II

I changed the URL as per the comments but they return the same results.

I think they should return the same results, but there should be an additional ID field that you can pick from the field picker that says (Inclusive). Once you’ve switched the ID fields out, it should work for both dash types.