Caching same query definition

CWr
New Member

The caching guide here
https://docs.looker.com/data-modeling/learning-lookml/caching
states that:
"When a new query is written, the cache is checked to see if the exact same query was previously run. All fields, filters, and parameters must be the same, including things such as the row limits. If the query is not found, then Looker runs the query against the database to get fresh database results (and those results are then cached).”

So to make use of caching a subsequent query must be the exact same query in terms of fields, filters and parameters. But does this mean that the query has to have the exact same fields, filters and parameters or the exact same fields, filter values and parameter values

0 1 147
1 REPLY 1

Hi @CWr 

It means exactly the same sql query. If you change a value, say for a country_field from US to DE, then the query has changed and will not make use of the cached query. 

Cached queries are a great resource to leverage for optimal performance. Ideally, you would like to align the timeframe for cached queries with your ETL schedule to ensure you always have up-to-date data while maximizing the cached queries. 

Top Labels in this Space
Top Solution Authors