Query Result Caching

Mixpanel stores the results from a report query in cache, and presents these results from cache when appropriate. This saves time when running a complicated query multiple times, and allows you to surface previously calculated results near-instantaneously.

Query result caching is currently fully supported in Insights, and for Insights cards, Retention cards, and Funnels cards in Dashboards.

Cached Query Results Presentation

Mixpanel presents report results from cache depending on the last time you ran a query. The date range of the query will adjust how Mixpanel presents results from the cache. 

  • If the query date range is over 30 days, then the query results are cached for up to 24 hours. 
  • If the query date range is 1 day, then the query results are cached for up to 15 minutes.
  • If the query date range is 30 days or under, then the query results are cached for up to 3 hours.

After a query is run, any subsequent execution of the same query presents results from the cache. A subsequent query that pulls results from cache also initiates a background query. The results from this query updates the cache with the most recent results. 

While this highlights the default cache behavior, you can always refresh a report to include the most current data.

You can see the last time that the cache was refreshed and a report was updated by viewing the “updated ... ago” field at the top of the query builder in Insights. This will indicate when the most recent results were surfaced in the report.

Cache_Update.png

You can also view when the most recent update was in Dashboards by hovering over report cards.

Dashboard_Cache.png

Refreshing the Query Results Cache

To refresh the query results cache, navigate to an Insights report and click the Refresh button at the top of the query builder.

Refresh_Cache.png

To refresh query results cache in a Dashboard, click the three dots in the top of the dashboard, and then click the Refresh all cards button.

Dashboard_Refresh.png

If the cached result is less than 1 min old, we always serve from cache without running a new background query.

Is this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.