Query caching and scheduling
How to control when your queries run.
Last updated
How to control when your queries run.
Last updated
Caching must first be enabled in your :
In the right sidebar, when no objects are selected the current caching settings for the canvas are displayed. To update these settings, click the Change button.
In the caching settings menu, there are three options for caching query results:
Never cache results
With this setting, whenever your canvas or report is opened, the queries for any visible cells will be sent to your database, ensuring the most up-to-date data possible. This option will result in the largest load on your database.
Cache results for...
With this setting, query results are saved for the specified duration. If the same query is run repeatedly within that time window, then cached results are returned. This option is often a reasonable trade-off between improving result freshness while reducing load on your database.
If cells are edited or executed using the Run cell button, then queries are always re-run.
Cache results indefinitely
With this setting, queries will not run unless cells are edited or executed using the Run cell button. This option minimises database load, but may result in old data being displayed.
If a schedule is selected, Count will execute the cells in this canvas that are connected to databases periodically. These scheduled queries are always run, even if cached results are available, and the new results will update those in the cache.
For example, to schedule a run at 8AM on weekdays only, enter 0 8 * * 1-5
. Note that cron custom expressions are always based on the UTC timezone.
Query result caching is only available on .
These settings are only accessible by and above.
By default all canvas cells are executed, but it is possible to execute fewer cells by hiding or cells, and choosing the appropriate option.
Several simple schedules can be selected from the options here. For more custom schedules, choose the Custom option to enter a schedule in the form of a .