> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Executions

> Learn about query execution triggers and which engine size is best for your workload.

Every query on Dune must be triggered and then executed on one of our query engines. The execution trigger determines *when* and *how* a query runs, while the engine size determines the compute resources allocated to it. Understanding both helps you optimize for speed, cost, and reliability.

## Query Execution Triggers

Queries on Dune need to be triggered before they are executed. Query executions can be triggered by any user or team for public queries, and by the owner for private queries. There are four ways a query execution can be triggered:

<AccordionGroup>
  <Accordion title="Interactive Execution">
    Interactive executions are manually triggered by a user clicking the "Run" button in the query editor or by refreshing an entire dashboard. You can choose to route interactive executions through the Small, Medium, or Large engine depending on the engine size you select.

    <div
      style={{
position: "relative",
paddingBottom: "calc(51.32275132275132% + 41px)",
height: 0,
width: "100%"
}}
    >
      <iframe
        src="https://demo.arcade.software/ydPbjr9bVYceANzQqrjW?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
        title="Change the Query Engine Size Before Running a SQL Query"
        frameBorder={0}
        loading="lazy"
        webkitallowfullscreen=""
        mozallowfullscreen=""
        allowFullScreen=""
        allow="clipboard-write"
        style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
      />
    </div>
  </Accordion>

  <Accordion title="Scheduled Execution">
    Scheduled executions are triggered automatically at a specific time and frequency that you configure. Scheduled executions can be routed through the Medium or Large engine depending on the execution tier you select.

    <div
      style={{
position: "relative",
paddingBottom: "calc(56.4583% + 41px)",
height: 0,
width: "100%"
}}
    >
      <iframe
        src="https://demo.arcade.software/iXtZ3vKUOaIhVC6aHRoE?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
        title="Schedule a Dune dashboard to refresh at a time interval"
        frameBorder={0}
        loading="lazy"
        webkitallowfullscreen=""
        mozallowfullscreen=""
        allowFullScreen=""
        allow="clipboard-write"
        style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
      />
    </div>
  </Accordion>

  <Accordion title="API Execution">
    API executions are triggered programmatically through a Dune API call. This is useful for embedding query results in your own application or automating query runs via a cron job. API executions can be routed through the Small, Medium, or Large engine depending on the engine size you select.

    [→ Learn more about API executions](/api-reference/executions/endpoint/execute-query)
  </Accordion>

  <Accordion title="Popular Dashboard Execution">
    Popular dashboards are automatically refreshed by Dune based on their view count. The most popular dashboards are refreshed every hour, while less popular dashboards are refreshed every 24 hours. These executions run on the community cluster at no credit cost.

    <img src="https://mintcdn.com/dune/kuKkfe7NiZRF86tb/query-engine/images/popular-dashboard.jpeg?fit=max&auto=format&n=kuKkfe7NiZRF86tb&q=85&s=cb75956376656ab4a254d24a22d0b27b" alt="" width="1860" height="652" data-path="query-engine/images/popular-dashboard.jpeg" />
  </Accordion>
</AccordionGroup>

## Query Engine Sizes

Dune has three query engine sizes: **Small**, **Medium**, and **Large**. The query engine size determines the amount of resources allocated to your query. The larger the engine, the more resources are allocated — meaning queries run faster and are less likely to time out.

<Note>
  The **Small** engine consumes a small amount of credits, while **Medium** and **Large** consume more credits based on actual compute used. [Learn more about credit usage](/resources/credits-billing/how-credits-work).
</Note>

<div
  style={{
position: "relative",
paddingBottom: "calc(51.32275132275132% + 41px)",
height: 0,
width: "100%"
}}
>
  <iframe
    src="https://demo.arcade.software/BjFIbl6K2SOuOCfHMVLp?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
    title="Run a SQL Query with Increased Engine Size"
    frameBorder={0}
    loading="lazy"
    webkitallowfullscreen=""
    mozallowfullscreen=""
    allowFullScreen=""
    allow="clipboard-write"
    style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
  />
</div>

#### Small Engine

The Small engine is the default for all queries on Dune. It runs on a shared community cluster, which means performance can vary when many users are running queries at the same time. Executions on the Small engine consume a small amount of credits and will time out after 2 minutes. You are limited to a maximum of three (3) concurrent executions.

<div
  style={{
position: "relative",
paddingBottom: "calc(52.21348779478693% + 41px)",
height: 0,
width: "100%"
}}
>
  <iframe
    src="https://demo.arcade.software/fPY0jrrBxJu3W48IrP36?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
    title="Change Query Engine Size and Re-Run a SQL Query"
    frameBorder={0}
    loading="lazy"
    webkitallowfullscreen=""
    mozallowfullscreen=""
    allowFullScreen=""
    allow="clipboard-write"
    style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
  />
</div>

#### Medium Engine

Run queries manually or programmatically with a larger timeout and no limit on concurrent executions. Credits are consumed based on actual compute resources used. Suitable for most standard queries and dashboards.

<div
  style={{
position: "relative",
paddingBottom: "calc(52.21348779478693% + 41px)",
height: 0,
width: "100%"
}}
>
  <iframe
    src="https://demo.arcade.software/ib1AmckiaVWol8ORGoPK?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
    title="Run a SQL Query and View Results in JSON Format"
    frameBorder={0}
    loading="lazy"
    webkitallowfullscreen=""
    mozallowfullscreen=""
    allowFullScreen=""
    allow="clipboard-write"
    style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
  />
</div>

#### Large Engine

Optimized for complex workloads requiring maximum computational power. The Large engine provides approximately 2x the capacity of Medium, completing queries faster but consuming more credits for the same query. Ideal for data-intensive queries and heavy analytics.

<div
  style={{
position: "relative",
paddingBottom: "calc(52.21348779478693% + 41px)",
height: 0,
width: "100%"
}}
>
  <iframe
    src="https://demo.arcade.software/e46dJVRb5maSXDOFLKLk?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
    title="Choose a Query Engine Size for Running Blockchain Data Queries"
    frameBorder={0}
    loading="lazy"
    webkitallowfullscreen=""
    mozallowfullscreen=""
    allowFullScreen=""
    allow="clipboard-write"
    style={{
  position: "absolute",
  top: 0,
  left: 0,
  width: "100%",
  height: "100%",
  colorScheme: "light"
}}
  />
</div>
