Overview

Queries on Dune need to be triggered and will be executed on one of our query engines.

Query executions can be triggered by any user/team in Dune for public queries and by the owner of the query for private queries. Query executions can be triggered through the query editor, the dashboard editor, or via the API. We also automatically refresh popular dashboards automatically in regular intervals.

The query engine determines the amount of resources allocated to your query. The larger the query engine, the more resources are allocated to your query. This means that queries executed on a larger query engine will run faster and are less likely to time out.

Query executions triggers

Query executions on Dune are triggered in four ways:

  1. Interactive executions are manually triggered by a user clicking the “Run” button in the query editor page or refreshing an entire dashboard. Interactive executions can be routed via the community, medium, or large cluster, depending on the query engine selected.

  2. Scheduled executions are triggered at a specific time and frequency. Scheduled executions can be routed via the medium or large cluster, depending on the execution tier selected.

  3. API executions are triggered by an API call. API executions can be routed via the community, medium, or large cluster, depending on the query engine selected.

  4. Popular dashboards are automatically refreshed based on their popularity. We measure popularity based on the number of views a dashboard has received. The most popular dashboards are refreshed every hour, the less popular dashboards are refreshed every 24 hours. Popular dashboards are refreshed via the community cluster.

Here is an overview of the different execution triggers:

Query engine size

Dune has three query engine sizes: community, medium, and large. The query engine size determines the amount of resources allocated to your query. The larger the query engine, the more resources are allocated to your query. This means that queries executed on a larger query engine will run faster and are less likely to time out.

Community engine size

The community engine is the default query engine for all queries on Dune. It is a shared cluster, meaning that it is used by all Dune users. This means that the community cluster can be busy at times if many users are running queries at the same time. To avoid long loading times and timeouts, we recommend using the medium or large engine for resource-intensive queries.
Executions on the community engine are free of charge and will time out after 2 minutes.

Medium engine size

The medium engine is built to handle most queries on Dune. It is cheap, reliable and fast. The medium engine will scale up and down depending on the demand. Executions on the medium engine cost 10 credits. It has a capacity equivalent to the Free engine, but executions can run for longer, timing out only after 30 minutes.

Large engine size

The large engine is built to handle the most resource-intensive queries on Dune. It’s blazing fast, reliable and can easily deal with large amounts of data. The large engine also scales up and down depending on the demand.

In addition to that, the large engine is also the only engine that can handle queries that requires lots of planning time. This mostly happens when you query a large amount of data, when you use a lot of joins or large aggregate window functions.

Executions on the large engine cost 20 credits. It has twice the capacity of the Medium engine, and executions can also run for 30 minutes.