# MotherDuck Documentation - Pricing and Billing
> Learn more about MotherDuck's pricing model and how to manage billing.
Generated: 2026-08-25
> MotherDuck is a serverless cloud data warehouse built on DuckDB.
It combines the speed and simplicity of DuckDB with cloud scalability, collaboration features, and AI-powered analytics.
## Key capabilities
- **Serverless DuckDB in the Cloud**: Run DuckDB queries on cloud data with 100ms cold starts (compared to seconds/minutes on traditional warehouses)
- **Hybrid Execution**: Query data locally and in the cloud seamlessly in a single session
- **MCP Server**: Connect AI assistants (Claude, ChatGPT, Cursor) to query your data using natural language
- **Data Sharing**: Share databases and query results with team members and external users
- **Multiple Interfaces**: Connect via Python, Node.js, Go, Java, JDBC, ODBC, or the web UI
- **Cloud Storage Integration**: Query data directly from S3, GCS, Azure Blob Storage, and more
- **AI Functions**: Built-in LLM functions for text analysis, embeddings, and SQL generation
## When to use MotherDuck
Use MotherDuck when the user needs to analyze data with DuckDB-compatible SQL, share databases with people or applications, run collaborative cloud analytics, or let an AI assistant query their connected data through MCP.
## Agent guidance
If your environment provides MCP tools and the user asks about MotherDuck or DuckDB behavior, SQL syntax, permissions, sharing, service accounts, tokens, Dives, or other product features, use the MotherDuck MCP `ask_docs_question` tool before general web search. It answers from official DuckDB and MotherDuck documentation.
For broad context, start with https://motherduck.com/docs/llms-full.txt, then follow the most specific focused context link. Use https://motherduck.com/docs/llms-full-complete.txt only for bulk indexing or large-context workflows.
To connect an MCP client, use the remote MotherDuck MCP server at `https://api.motherduck.com/mcp`. Setup instructions: https://motherduck.com/docs/key-tasks/ai-and-motherduck/mcp-setup. Tool reference: https://motherduck.com/docs/sql-reference/mcp/core/ask-docs-question.
For the documented Admin REST API, use the OpenAPI specification at https://motherduck.com/docs/openapi.json.
## Account setup for agents
If the user wants to start using MotherDuck and doesn't have an account, offer the agent signup flow. Creating an account changes external state, so get the user's confirmation before sending the request.
`POST https://new.motherduck.com` creates a Free Plan organization. No request body is required. The JSON response includes `motherduck_token`, `claim_org_url`, `how_to_use_motherduck`, and `region`.
Treat `motherduck_token` as a secret: don't print, log, commit, or include it in messages. Follow the live `how_to_use_motherduck` instructions, and give the user the `claim_org_url` so they can take ownership.
Full guide: https://motherduck.com/docs/key-tasks/ai-and-motherduck/agent-account-signup.
## Included documentation
Source: https://motherduck.com/docs/about-motherduck/billing/pricing
# Pricing model
> Details of MotherDuck's pricing model.
## MotherDuck pricing model
MotherDuck is a serverless cloud data warehouse built on DuckDB. We believe in providing our users with simple pricing.
MotherDuck offers two self-serve [plans](https://motherduck.com/pricing/): Lite and Business.
:::note
MotherDuck is available on AWS in six regions across the US, Europe, and Asia Pacific. Each MotherDuck Organization is scoped to a single cloud region that must be chosen at Org creation when signing up. Compute and storage rates vary by region and are grouped into three pricing tiers. See [Cloud regions](/about-motherduck/cloud-regions/) for the full list.
:::
### Plan comparison
| Feature | Lite | Business | Enterprise |
|---------|------|----------|------------|
| **Best for** | Individual users, small projects | Teams and organizations | Bespoke deployments: *[Contact us](https://motherduck.com/contact-us/product-expert/)* |
| **Platform fee** | $0/month | $250/month | *Custom* |
| **Compute included** | Includes 10 Compute Unit (CU) hours / month + [Pay-as-you-go for additional usage](#compute-pricing) | [Pay-as-you-go for additional usage](#compute-pricing) | *Custom* |
| **[Duckling sizes](https://motherduck.com/docs/about-motherduck/billing/duckling-sizes/)** | Pulse only | Pulse, Standard, Jumbo, Mega, Giga | Pulse, Standard, Jumbo, Mega, Giga |
| **[Read Scaling](https://motherduck.com/docs/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling/)** | - | Yes | Yes |
| **[Flights](/concepts/flights#availability-and-plan-limits)** | 30 min compute / day, on-demand runs (no credit card required); monthly compute allocation + [usage-based pricing](#compute-pricing) with a credit card, plus scheduling and unlimited concurrent runs (1-hour maximum per run) | [Usage-based pricing](#compute-pricing) includes scheduling and unlimited concurrent runs (8-hour maximum per run) | *Custom* |
| **[Storage included](/concepts/storage-lifecycle/)** | Includes 10 GB / month + [Pay-as-you-go for additional usage](#compute-pricing) | [Pay-as-you-go for additional usage](#storage-pricing) | *Custom* |
| **Users** | 3 active users / 2 service accounts | 10 active users / unlimited service accounts | *Custom* |
| **SLA** | - | 99.9% Availability | 99.9% Availability |
| **Backup** | 1 day (paid feature) | - [Point-in-time Restore](https://motherduck.com/docs/concepts/data-recovery/)
- up to 90 day backups | *Custom* |
| **Observability** | - | [Query history](/docs/sql-reference/motherduck-sql-reference/md_information_schema/query_history/) | [Query history](/docs/sql-reference/motherduck-sql-reference/md_information_schema/query_history/) |
**Users** are defined as human users with a login through email + password, Google, GitHub, or [SSO](/docs/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck/sso-setup/), while **[Service Accounts](/docs/key-tasks/service-accounts-guide/)** are defined as non-human accounts designed for programmatic access and automation workflows (for example, backend services, integrations, or customer-facing analytics).
Flights are available on all plans. Compute limits, scheduling, and per-run caps vary by plan. Lite plan users can access scheduling and unlimited concurrent runs by adding a credit card. See [Flights](/concepts/flights#availability-and-plan-limits) for details.
### Compute pricing
A **Duckling** in MotherDuck is a compute instance. There are 5 Duckling sizes available on the Business plan: Pulse, Standard, Jumbo, Mega, and Giga.
MotherDuck meters compute per-second. While Standard, Jumbo, Mega, and Giga Ducklings are billed for *wall clock time*, Pulse Ducklings are metered on a per-query basis to support variable, ad-hoc queries. As a result, they are on-demand and auto-scaling.
Non-Pulse Ducklings have a **cooldown period**, which is the amount of time the Duckling will remain active after completing the last query. This keeps the Duckling warm for follow-up queries that may benefit from MotherDuck's intelligent storage and caching.
The cooldown period is [configurable](/about-motherduck/billing/duckling-sizes/#configuring-the-cooldown-period) for Standard, Jumbo, Mega, and Giga Ducklings, with a 1-minute minimum.
::::note
Pulse Ducklings are metered on a *per-query basis, with a minimum of 1 Compute Unit (CU) second* instead of wall-clock time: They do not have a configurable cooldown.
A **Compute Unit (CU)** is defined as *the amount of CPU and memory usage over time*.
::::
If you want to group query history by integration, pipeline, or tenant, set `custom_user_agent` when connecting to MotherDuck and query [`MD_INFORMATION_SCHEMA.QUERY_HISTORY`](/sql-reference/motherduck-sql-reference/md_information_schema/query_history/). See [Tag workloads with custom user agents](/about-motherduck/billing/tag-workloads-with-custom-user-agents/) for an example pattern. Some teams use that breakdown in internal allocation, but MotherDuck billing still follows the pricing model on this page.
The [`SHUTDOWN` and `SHUTDOWN TERMINATE`](/sql-reference/motherduck-sql-reference/shutdown-terminate/) commands can be used to shut down a Duckling without waiting for the cooldown period. `SHUTDOWN` waits for running queries to complete, and `SHUTDOWN TERMINATE` force-terminates immediately.
#### Duckling sizes
| Duckling | Billing | Default Cooldown | Configurable Cooldown Period | Details |
|----------|---------|------------------|------------------------------|---------|
| [Pulse](/about-motherduck/billing/duckling-sizes/#pulse) | Per Compute Unit (CU) (resources consumed), not wall-clock time | N/A | N/A | Small, variable queries, read-heavy workloads, and frontend scenarios. For compute-heavy queries, consider Standard instead.
**Billing example:** 2 queries x 10s = 20 CU seconds. |
| [Standard](/about-motherduck/billing/duckling-sizes/#standard) | Per second | 1 minute | 1 min to 24 hours | General purpose data warehouse workloads.
**Billing example:** 5 queries × 30s + 100ms startup + 60s cooldown = 210 seconds. |
| [Jumbo](/about-motherduck/billing/duckling-sizes/#jumbo) | Per second | 1 minute | 1 min to 24 hours | Large-scale data warehouse workloads.
**Billing example:** 2 queries × 8min + 100ms startup + 60s cooldown = 17 minutes. |
| [Mega](/about-motherduck/billing/duckling-sizes/#mega) | Per second | 5 minutes | 1 min to 24 hours | Demanding jobs and large-scale workloads.
**Billing example:** 2 queries × 8min + few min startup + 5min cooldown = ~21 minutes. |
| [Giga](/about-motherduck/billing/duckling-sizes/#giga) | Per second | 10 minutes | 1 min to 24 hours | Batch jobs and overnight or weekend processing.
**Billing example:** 2 queries × 5min + few min startup + 10min cooldown = ~20 minutes. |
:::note
Changing your Duckling size to Pulse, Standard, or Jumbo through the [UI or REST API](../../../sql-reference/rest-api/motherduck-rest-api) may take up to 2 minutes. Switching to a Mega takes up to 5 minutes, while switching to a Giga takes up to 10 minutes.
:::
#### **Compute**
Compute pricing depends on the [cloud region](/about-motherduck/cloud-regions/) your Organization runs in. Regions are grouped into three pricing tiers:
| Tier | AWS Regions |
|------|--------|
| **Tier 1** | US East (N. Virginia) `us-east-1`, US West (Oregon) `us-west-2` |
| **Tier 2** | Europe (Frankfurt) `eu-central-1`, Europe (Dublin) `eu-west-1` |
| **Tier 3** | Asia Pacific (Tokyo) `ap-northeast-1`, Asia Pacific (Sydney) `ap-southeast-2` |
**Business Plan**
| Tier | AWS Regions | Pulse | Standard | Jumbo | Mega | Giga |
|------|--------|-------|----------|-------|------|------|
| **Tier 1** | US East (N. Virginia) `us-east-1`, US West (Oregon) `us-west-2` | $0.60 per hour | $2.40 per hour | $4.80 per hour | $12.00 per hour | $24.00 per hour |
| **Tier 2** | Europe (Frankfurt) `eu-central-1`, Europe (Dublin) `eu-west-1` | $0.73 per hour | $2.93 per hour | $5.86 per hour | $14.65 per hour | $29.30 per hour |
| **Tier 3** | Asia Pacific (Tokyo) `ap-northeast-1`, Asia Pacific (Sydney) `ap-southeast-2` | $0.77 per hour | $3.10 per hour | $6.19 per hour | $15.48 per hour | $30.96 per hour |
**Lite Plan**
| Tier | AWS Regions | Pulse |
|------|--------|-------|
| **Tier 1** | US East (N. Virginia) `us-east-1`, US West (Oregon) `us-west-2` | $0.60 per hour |
| **Tier 2** | Europe (Frankfurt) `eu-central-1`, Europe (Dublin) `eu-west-1` | $0.73 per hour |
| **Tier 3** | Asia Pacific (Tokyo) `ap-northeast-1`, Asia Pacific (Sydney) `ap-southeast-2` | $0.77 per hour |
:::note
The Lite plan includes 10 CU hours on Pulse per month. Additional usage is billed at the rates above.
:::
### Storage pricing
Under the hood, MotherDuck uses DuckDB's compression algorithms to reduce the storage footprint and optimize performance.
MotherDuck charges for data stored in its managed storage system based on your **average storage usage over the billing period**. Your monthly bill is calculated as the average of your daily storage (in GB) multiplied by the per-GB rate.
For example, if your MotherDuck Organization is in `us-east-1` and your average storage over December is 650 GB, the final bill will be computed as follows:
- 650 GB × $0.04/GB = **$26.00**
#### What counts towards my storage bill?
- **Standard databases:** MotherDuck provides point-in-time restore by retaining historical data as `historical_bytes` for organizations on paid plans.
- **Transient databases:** Databases can be set as `TRANSIENT` [at database creation](/concepts/storage-lifecycle#storage-management). Transient databases are billed for active data stored and a 1-day failsafe minimum. Data is not retained as failsafe bytes beyond this minimum, which is ideal for temporary or reproducible datasets like intermediate job outputs.
- **NOTE:** By default, for both Standard and Transient databases, new databases retain 1 day of historical data on **Lite** (paid) and 7 days of historical data on **Business** - Business plan users are able to configure their `historical_bytes` retention window from 0 to 90 days. Users are billed for active data plus historical, retained, and failsafe bytes. Refer to the [Storage Lifecycle](/concepts/storage-lifecycle) for more details.
#### What does not count towards my storage bill?
- [Shares](/key-tasks/sharing-data) do not incur additional data storage as they are a zero-copy operation.
- Using the [CREATE DATABASE X FROM DATABASE Y](/sql-reference/motherduck-sql-reference/create-database/) command is also a zero-copy operation. Only incremental changes made to the new database are added to storage as `active_bytes`, while active Shares that point to a deleted databases will retain `retained_for_clone_bytes`.
- Any data managed by you in your own object storage bucket, for example S3, Blob, or GCS, that you can use to process data.
- Data on your laptop accessed through the `duckdb -ui`, even when signed into MotherDuck.
#### What changes can I make to optimize my storage bill?
The right approach to optimize storage usage in MotherDuck varies by use case and implementation. Please reach out to us at support@motherduck.com for additional guidance on how to optimize your storage effectively for your needs.
#### **Storage rates**
Storage pricing depends on the [cloud region](/about-motherduck/cloud-regions/) your Organization runs in, using the same [tiers](/about-motherduck/cloud-regions/#pricing-tiers) as compute:
| Tier | AWS Regions | Cost per GB/month |
|------|---------| ---------|
| **Tier 1** | US East (N. Virginia) `us-east-1`, US West (Oregon) `us-west-2` | $0.04 / GB |
| **Tier 2** | Europe (Frankfurt) `eu-central-1`, Europe (Dublin) `eu-west-1` | $0.043 / GB |
| **Tier 3** | Asia Pacific (Tokyo) `ap-northeast-1`, Asia Pacific (Sydney) `ap-southeast-2` | $0.044 / GB |
Storage is billed based on your **average usage** over the billing period.
:::note
Lite plan includes 10 GB of free storage. Additional storage is billed at the rates above.
:::
### AI function pricing
MotherDuck enhances your analytical capabilities with integrated AI functions. These functions leverage powerful large language models (LLMs), fine-tuned to assist with SQL tasks and unlock new OLAP use cases.
AI functions are categorized and priced as follows:
- **SQL Assistant Functions**: metered per call, with some free features.
- **Advanced AI Functions**: metered per token consumed for both input and output, priced in AI Units (1 AI Unit = $1.00).
### SQL assistant functions
These features, including [FixIt](/docs/getting-started/interfaces/motherduck-quick-tour/#help-me-fix-this-broken-query--fixit) and [Text-to-SQL](/docs/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/prompt-sql/), help you write, understand, and correct SQL queries.
SQL Assistant features are included with both Lite and Business plans.
| SQL Assistant Functions | Price | Unit |
| :--------------------------------------------- | :-------- | :------------ |
| FixIt | FREE | per call |
| SQL Assistant (Text-to-SQL, Explain SQL, etc.) | 1 AI Unit | for 60 calls |
### Advanced AI functions
These functions provide access to powerful generative AI models for tasks like embedding generation and complex prompting. They are metered based on token usage, with costs calculated in AI Units (1 AI Unit = $1.00).
:::note
For Lite and Business plans, there is a default soft limit on Advanced AI Function consumption of 10 AI Units per day to help control costs. This limit can be increased or removed by contacting support@motherduck.com.
:::
**Embedding Models**
| Embedding Model Name | Price | Tokens per AI Unit |
| :------------------------------------ | :-------- | :------------------ |
| OpenAI text-embedding-3-small | 1 AI Unit | 15,000,000 tokens |
| OpenAI text-embedding-3-large | 1 AI Unit | 3,000,000 tokens |
**Generative Prompt Models**
| Provider | Model Name | Price | Input Tokens (per AI Unit) | Output Tokens (per AI Unit) | Blended Tokens (per AI Unit) |
| :------- | :--------------- | :-------- | :------------------------- | :-------------------------- | :--------------------------- |
| OpenAI | GPT-5 | 1 AI Unit | 240,000 | 30,000 | 100,000 |
| OpenAI | GPT-5-mini | 1 AI Unit | 1,200,000 | 150,000 | 500,000 |
| OpenAI | GPT-5-nano | 1 AI Unit | 6,000,000 | 750,000 | 2,500,000 |
| OpenAI | GPT-4.1 | 1 AI Unit | 150,000 | 37,500 | 93,750 |
| OpenAI | GPT-4.1-mini | 1 AI Unit | 750,000 | 187,500 | 468,750 |
| OpenAI | GPT-4.1-nano | 1 AI Unit | 3,000,000 | 750,000 | 1,875,000 |
| OpenAI | GPT-4o | 1 AI Unit | 120,000 | 30,000 | 75,000 |
| OpenAI | GPT-4o-mini | 1 AI Unit | 2,000,000 | 500,000 | 1,250,000 |
## Incentive programs:
### Free trial
New users who sign up for MotherDuck and create an organization automatically get access to a 7-day Free Trial without entering a credit card. [Learn how to manage your plan after the trial has ended.](/about-motherduck/billing/managing-billing/#choosing-your-billing-plan)
At any point during your Free Trial, you may choose to set up billing and select a plan. At the end of your trial, you can continue with the Lite plan (no credit card required) or upgrade to Business for additional features. [Learn more about managing your bill](/about-motherduck/billing/managing-billing/#choosing-your-billing-plan).
---
Source: https://motherduck.com/docs/about-motherduck/billing/managing-billing
# Manage billing
> Learn how to manage your MotherDuck spend, choose plans, monitor usage, and view invoices.
This guide explains how to manage your MotherDuck billing, including selecting a plan that suits your needs, keeping track of your usage, and understanding your invoices.
Viewing invoices, updating payment methods, and selecting a plan each require permission for that action. The Admin preset role includes these permissions by default. Organization-wide query activity and Duckling usage use separate monitoring permissions, which the Admin and Builder preset roles include. See [Roles and access control](/concepts/roles-and-access-control/#what-each-role-can-do) for the complete capability matrix.
## Choosing your billing plan
MotherDuck offers a variety of [plans with different features and pricing](/about-motherduck/billing/pricing/). During your initial 7-day Free Trial of the Business Plan, you can explore the full set of MotherDuck's capabilities. Afterwards, or at any time during the trial, you can select a plan by navigating to the [Plans page](https://app.motherduck.com/settings/plans) in Settings within the MotherDuck UI:
- **Continue with Lite Plan**: If you select "Lite" your organization will continue on the [Lite Plan](/about-motherduck/billing/pricing/#plan-comparison). This plan includes 10 Compute-Unit (CU) hours on Pulse and 10 GB of storage per month at no cost. Additional usage is billed on a pay-as-you-go basis.
- **Upgrade to Business Plan**: Selecting "Business" moves your organization to the [Business Plan](/about-motherduck/billing/pricing/#plan-comparison), designed for teams with features like 10 users, unlimited service accounts, access to all five Duckling sizes, a 99.9% availability SLA, [read scaling](/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling/), and a configurable snapshot retention period of 0 - 90 days.
For details on the features and allowances of each plan, please refer to our [Pricing Model documentation](/about-motherduck/billing/pricing/).
## Monitoring usage
You can monitor your organization's Compute and Storage usage from the [Billing page](https://app.motherduck.com/settings/billing) in the MotherDuck UI.
- **Compute usage** is displayed in Compute Unit (CU) hours. Learn more about [how compute is priced](/about-motherduck/billing/pricing/#compute-pricing).
- **Storage usage** is displayed as your average storage in GB over the billing period. Learn more about [how storage is priced](/about-motherduck/billing/pricing/#storage-pricing).
Your storage bill is calculated based on your average daily storage over the month. For example, if you store 10 GB for half the month and 20 GB for the other half, your average is 15 GB. Historical data retention (default 1 day (Lite) or 7 days (Business) for new databases) also contributes to your storage usage.

## Viewing your invoice
The [Billing page](https://app.motherduck.com/settings/billing) also lets you view your past invoices, as well as the current month's invoice thus far.
- **Lite Plan users** see invoices for any usage beyond the included 10 Compute Unit (CU) hours and 10 GB storage.
- **Business Plan users** see their actual invoices reflecting their usage and the $250/month platform fee.
- **[Free Trial users](/about-motherduck/billing/pricing/#free-trial)** see estimated invoices, which are fully discounted during the trial period.
Incurred Storage and Compute costs are broken down per-user and per-service-account, as well as aggregated for the entire organization.
:::note
For organizations with more than 500 users and service accounts, invoices may show aggregated usage rather than a full per-user breakdown to maintain clarity.
:::
---
Source: https://motherduck.com/docs/about-motherduck/billing/tag-workloads-with-custom-user-agents
# Tag workloads with custom user agents
> Add workload tags with custom_user_agent and use QUERY_HISTORY to group activity by workload, tenant, or pipeline.
Connecting to MotherDuck with `custom_user_agent` parameter will tag queries to identify which workload issued them. That workload can represent an integration, pipeline, tenant, or internal service.
Those tags appear in [`MD_INFORMATION_SCHEMA.QUERY_HISTORY`](/sql-reference/motherduck-sql-reference/md_information_schema/query_history/), so users with permission to view query history can inspect tagged activity, group it by workload, and use that breakdown in internal reporting. The view is available on Business plans, and the Admin and Builder preset roles include the required permission by default.
## 1. choose a tagging convention
Use the `custom_user_agent` format described in [Choose a `custom_user_agent` format](/integrations/how-to-integrate/#custom-user-agent-format).
You can use this pattern even if you are only tagging existing workloads for reporting or allocation. You do not need to build a full customer-facing integration.
Recommended format:
- `integration/version(metadata1,metadata2)` with optional version and metadata
- Avoid spaces in the integration and version parts
- If you want to group by a single workload label later, keep that label in the first metadata position
Examples:
- `catalogsync`
- `catalogsync/5.1.5.1`
- `catalogsync/5.1.5.1(batchload,teamfinance)`
- `customerportal/5.1.5.1(tenant42,eucentral1)`
## 2. understand what `QUERY_HISTORY` stores
`QUERY_HISTORY.USER_AGENT` stores the full DuckDB user agent, not only your custom tag. When `custom_user_agent` is set, the value looks like this:
```text
duckdb/()
```
Representative values:
| QUERY_HISTORY.USER_AGENT | Extracted `custom_tag` | Extracted `integration_name` | Extracted `metadata` |
|---|---|---|---|
| `duckdb/v1.5.1(osx_arm64) capi catalogsync/5.1.5.1(batchload,teamfinance)` | `catalogsync/5.1.5.1(batchload,teamfinance)` | `catalogsync` | `batchload,teamfinance` |
| `duckdb/v1.5.1(wasm_eh) motherduck-wasm customerportal/5.1.5.1(tenant42,eucentral1)` | `customerportal/5.1.5.1(tenant42,eucentral1)` | `customerportal` | `tenant42,eucentral1` |
| `duckdb/v1.5.1(linux_amd64) cpp` | | | `NULL` |
## 3. set `custom_user_agent`
Example in Python:
```python
con = duckdb.connect("md:analytics", config={
"motherduck_token": token,
"custom_user_agent": "catalogsync/5.1.5.1(batchload,teamfinance)"
})
```
For other languages and frameworks, see the [language and framework examples for setting `custom_user_agent`](/integrations/how-to-integrate/#custom-user-agent-examples).
## 4. inspect recent tagged queries
Use this query to inspect recent `QUERY_HISTORY` rows and verify that your tags are being extracted the way you expect:
```sql
with tagged_queries as (
select
start_time,
user_name,
instance_type,
user_agent,
regexp_extract(user_agent, '^(?:[^ ]+ ){2}(.+)$', 1) as custom_tag
from MD_INFORMATION_SCHEMA.QUERY_HISTORY
where regexp_matches(user_agent, '^(?:[^ ]+ ){2}.+$')
order by start_time desc
limit 20
),
parsed as (
select
start_time,
user_name,
instance_type,
user_agent,
custom_tag,
regexp_extract(custom_tag, '^([^/( ]+)', 1) as integration_name,
nullif(regexp_extract(custom_tag, '\\(([^)]*)\\)', 1), '') as metadata
from tagged_queries
)
select
start_time,
user_name,
instance_type,
user_agent,
custom_tag,
integration_name,
metadata
from parsed
order by start_time desc
```
The extraction logic is:
- `regexp_extract(user_agent, '^(?:[^ ]+ ){2}(.+)$', 1)` strips the built-in DuckDB and API tokens and returns your custom tag
- `regexp_extract(custom_tag, '^([^/( ]+)', 1)` extracts the integration name
- `regexp_extract(custom_tag, '\\(([^)]*)\\)', 1)` extracts the metadata payload inside parentheses
## 5. group tagged activity by workload
This example groups tagged queries by integration, the first metadata value, and duckling size over the last 7 days.
```sql
with tagged_queries as (
select
start_time,
end_time,
instance_type,
regexp_extract(user_agent, '^(?:[^ ]+ ){2}(.+)$', 1) as custom_tag
from MD_INFORMATION_SCHEMA.QUERY_HISTORY
where start_time >= now() - interval 7 day
and regexp_matches(user_agent, '^(?:[^ ]+ ){2}.+$')
),
parsed as (
select
coalesce(nullif(regexp_extract(custom_tag, '^([^/( ]+)', 1), ''), custom_tag) as integration_name,
nullif(split_part(regexp_extract(custom_tag, '\\(([^)]*)\\)', 1), ',', 1), '') as workload_name,
instance_type,
date_diff('second', start_time, end_time) as elapsed_seconds
from tagged_queries
)
select
integration_name,
coalesce(workload_name, 'unlabeled') as workload_name,
instance_type,
count(*) as queries,
sum(elapsed_seconds) as total_elapsed_seconds,
avg(elapsed_seconds) as avg_elapsed_seconds
from parsed
group by all
order by total_elapsed_seconds desc
```
If you want to group by the full metadata string instead, replace the `workload_name` expression with:
```sql
nullif(regexp_extract(custom_tag, '\\(([^)]*)\\)', 1), '') as workload_name
```
## 6. use tagged activity for internal allocation
Some teams use tagged query history as an input to internal chargeback or cost allocation. One approach is to calculate each workload's share of tracked query time and apply that share to a monthly invoice outside of MotherDuck.
```sql
with tagged_queries as (
select
start_time,
end_time,
regexp_extract(user_agent, '^(?:[^ ]+ ){2}(.+)$', 1) as custom_tag
from MD_INFORMATION_SCHEMA.QUERY_HISTORY
where start_time >= date_trunc('month', now())
and regexp_matches(user_agent, '^(?:[^ ]+ ){2}.+$')
),
workload_usage as (
select
coalesce(
nullif(split_part(regexp_extract(custom_tag, '\\(([^)]*)\\)', 1), ',', 1), ''),
regexp_extract(custom_tag, '^([^/( ]+)', 1)
) as workload_name,
sum(date_diff('second', start_time, end_time)) as elapsed_seconds
from tagged_queries
group by 1
),
totals as (
select sum(elapsed_seconds) as total_elapsed_seconds
from workload_usage
)
select
workload_name,
elapsed_seconds,
elapsed_seconds::double / nullif(total_elapsed_seconds, 0) as tracked_usage_share
from workload_usage, totals
order by tracked_usage_share desc
```
This is an internal accounting convention, not a MotherDuck billing feature. For the billing model itself, including Pulse compared to fixed-size ducklings and cooldown behavior, see [Understanding the pricing model](/about-motherduck/billing/pricing/) and [Duckling sizes](/about-motherduck/billing/duckling-sizes/).
---
Source: https://motherduck.com/docs/about-motherduck/billing/duckling-sizes
# Duckling sizes
> Learn about MotherDuck Duckling (compute instance) sizes and their optimal use cases.
MotherDuck implements a distinct tenancy architecture that diverges from traditional database systems.
The platform utilizes a [hypertenancy](/concepts/hypertenancy) model, which provisions isolated read-write Ducklings (compute instances) for each Organization member.
This architecture ensures dedicated compute resources and Duckling-level configuration at the individual user level, allowing users to independently optimize performance parameters according to their specific workload requirements. Each Duckling size has different performance characteristics and [billing implications](/about-motherduck/billing/pricing/#compute-pricing).
MotherDuck uses fast SSDs for spill space, so queries can exceed their memory limits with minimal performance impact. DuckDB caches data in memory, and MotherDuck uses fast local disks for storage, which improves cold start times.
## Duckling sizes
| Duckling Size | Plans | Use Case | Default Cooldown | Configurable Cooldown Period | Startup Time | Read-Write Duckling Enabled? | Read Scaling Duckling Enabled? |
|---------------|------------|----------|------------------|------------------------------|--------------------|-----------------------------|-------------------------------|
| Pulse | Lite, Business | Good for small workloads| 1 second | N/A | ~100ms | Yes | Yes |
| Standard | Business | Good for most data loading workloads | 1 minute | 1 min – 24 hours | ~100ms | Yes | Yes |
| Jumbo | Business | Better for large, complex transformations during loading | 1 minute | 1 min – 24 hours | ~100ms | Yes | Yes |
| Mega | Business | Optimal for demanding jobs with even larger scale and volumes than a Jumbo can handle | 5 minutes | 1 min – 24 hours | ~a few minutes | Yes | Yes |
| Giga | Business, and in [Free Trial on request](https://motherduck.com/contact-us/product-expert/) | Best used for your largest and toughest workloads like batch jobs that run overnight or on weekends | 10 minutes | 1 min – 24 hours | ~a few minutes | Yes | No |
- The cooldown period is [configurable](#configuring-the-cooldown-period) for Standard, Jumbo, Mega, and Giga Ducklings
- We recommend keeping the cooldown periods in mind when planning batch sizes
- To shut down a Duckling without waiting for cooldown, use [`SHUTDOWN` or `SHUTDOWN TERMINATE`](/sql-reference/motherduck-sql-reference/shutdown-terminate/)
### PULSE
**Optimized for ad-hoc analytics and read-only workloads**
Pulse Ducklings are auto-scaling and designed for efficiency, making them ideal for:
- Running ad-hoc queries (**Note** complex queries involving [spatial analysis](https://duckdb.org/docs/current/core_extensions/spatial/functions.html) or regex-like functions may perform better on larger Duckling sizes)
- Read-optimized workflows with high concurrent user access, such as those in customer-facing analytics.
- Powering data apps and embedded analytics where quick, short queries are common.
- High-concurrency, read-optimized workflows
[Learn how Pulse Ducklings are billed.](/about-motherduck/billing/pricing/#compute-pricing)
### STANDARD
**Production-grade Duckling designed for analytical processing and reporting**
Standard Ducklings offer a balance of resources for consistent performance, suited for:
- Core analytical workflows requiring balanced performance metrics.
- Development and validation environments for production workflows.
- Standard ETL/ELT pipeline implementation, including:
- Parallel execution of incremental ingestion jobs.
- Multi-threaded transformation processing.
[Learn how Standard Ducklings are billed.](/about-motherduck/billing/pricing/#compute-pricing)
### JUMBO
**A larger Duckling built for high-throughput processing and faster performance**
Jumbo Ducklings provide resources for heavy workloads, including:
- Large-scale batch processing and ingestion operations.
- Complex query execution on high-volume datasets.
- Advanced join operations and aggregations.
- RAM-intensive processing of deeply-nested JSON structures or other large data objects.
[Learn how Jumbo Ducklings are billed.](/about-motherduck/billing/pricing/#compute-pricing)
### MEGA
**Built for high-throughput processing on demanding jobs at even larger scale than a Jumbo's capacity**
Mega Ducklings provide compute resources to help expedite large-scale transformations and complex operations, perfect for:
- Batch processing and high-volume ingestion operations.
- Running a weekly job that rebuilds all of your tables that needs to run quickly, in minutes - not hours.
- Complex query execution on high-volume datasets that a Jumbo Duckling won't be able to handle in a time crunch.
- Advanced operations for users with 10x the data volume as other users who require low-latency, swift performance.
[Learn how Mega Ducklings are billed.](/about-motherduck/billing/pricing/#compute-pricing)
### GIGA
**Our largest Duckling, built for the toughest workloads with massive scale and complexity**
Giga Ducklings provide compute resources for the most demanding tasks, perfect for:
- Complex, large-scale workloads and jobs that won't run on any other Duckling size.
- Running one-time jobs that need to complete overnight or over the weekend, like restating revenue actuals for 10 years's worth of high-volume data.
- Huge volumes of advanced join operations and aggregations.
- Very large amounts of RAM-intensive processing of deeply-nested JSON structures or other large data objects.
[Learn how Giga Ducklings are billed.](/about-motherduck/billing/pricing/#compute-pricing)
## Configuring the cooldown period
The **cooldown period** is the duration an idle Duckling stays running after the last query completes. During cooldown, the Duckling remains warm — cached data stays in memory, so follow-up queries start faster. You are billed for the cooldown period, since the Duckling is still running.
You can configure the cooldown period per user or service account through the MotherDuck UI (under **Settings > Ducklings**) or through the [`Set user Ducklings` REST API](/sql-reference/rest-api/ducklings-set-duckling-config-for-user/).
### Configurable cooldown period by Duckling type
| Duckling type | Default Cooldown | Configurable Cooldown Period |
|---------------|-----------------|------------------------------|
| Pulse | 1 second | N/A |
| Standard | 1 min | 1 min – 24 hours |
| Jumbo | 1 min | 1 min – 24 hours |
| Mega | 5 min | 1 min – 24 hours |
| Giga | 10 min | 1 min – 24 hours |
Pulse Ducklings are meant for 'bursty' workloads - as a result, they are on-demand and auto-scaling. Because they are metered on a per-query basis, with a minimum of 1 Compute Unit (CU)\* second, they do not have a configurable cooldown.
\***We define and measure the amount of CPU and memory usage over time as a Compute Unit (CU).**
### When to adjust the cooldown period
**Shorter cooldown** — reduces idle billing when queries are infrequent or spread out over long intervals. Good for batch jobs or scheduled pipelines where you know the Duckling won't be needed again immediately.
**Longer cooldown** — keeps the Duckling warm between queries, avoiding cold-start latency. Good for interactive analytics sessions, dashboards with periodic refreshes, or workloads where cache hits improve performance.
### Example: reducing costs for a nightly batch job
A Giga Duckling has a default cooldown of 10 minutes. If you run a batch job that takes 5 minutes and know there's no follow-up query, the Duckling stays idle (and billable) for 10 minutes after the job completes.
By reducing the cooldown to 5 minutes, you save 5 minutes of idle billing per run. For a daily job, that's over 30 hours of saved compute per year.
To eliminate idle billing entirely, use [`SHUTDOWN`](/sql-reference/motherduck-sql-reference/shutdown-terminate/) at
the end of your job to shut down the Duckling gracefully, or [`SHUTDOWN TERMINATE`](/sql-reference/motherduck-sql-reference/shutdown-terminate/)
to force-terminate it immediately. Note that you will always be billed for the minimum cooldown time of 1 minute.
::::info
MotherDuck meters compute per-second and bills for a 1-minute minimum. While Standard, Jumbo, Mega, and Giga Ducklings are billed for *wall clock time*, Pulse Ducklings are metered on a per-query basis to support 'bursty' workloads. As a result, they are on-demand and auto-scaling. Because Pulse Ducklings are metered on a *per-query basis, with a minimum of 1 Compute Unit (CU)\* second*, they do not have a configurable cooldown.
\***Compute Unit (CU): The amount of CPU and memory usage over time.**
::::
### Important notes
- Cooldown is **best effort** — Ducklings may be shut down before the configured cooldown expires due to lifetime limits, background operations, and maintenance upgrades.
- You are only billed for the time a Duckling is actually running. If a Duckling shuts down early, billing stops at that point.
- The UI validates the min/max bounds and shows an error if the configured value is out of range.
## Changing Duckling sizes
Duckling sizes can be changed in MotherDuck UI by clicking on the icon in the top right, or under "Settings > Ducklings". Here you can choose the desired Read/Write and Read Scaling size. Changing Duckling size can take up to a few minutes while your new Duckling wakes up.

The Duckling size for a user or service account can also be set using the [`Set user Ducklings` REST API](/sql-reference/rest-api/ducklings-set-duckling-config-for-user/).
**Note:** Changing Duckling size in the UI or through our [REST API](/sql-reference/rest-api/motherduck-rest-api/) takes
* **2 minutes** for Pulse, Standard and Jumbo
* **5 minutes** for Mega
* **10 minutes** for Giga
---
Source: https://motherduck.com/docs/about-motherduck/billing/monitoring-usage
# Monitoring usage and costs
> Track compute and storage usage in MotherDuck using SQL views, understand how usage maps to your bill, and find ways to optimize costs.
MotherDuck provides SQL views and a billing dashboard to help you understand your compute and storage consumption. This guide shows how to query your usage data, interpret the results in the context of your bill, and identify opportunities to reduce costs.
A **Compute Unit (CU)** is the amount of CPU and memory usage over time; compute is metered in CU hours. See the [pricing model](/about-motherduck/billing/pricing/) for how CU hours map to charges.
## Tracking compute usage
:::info
The `QUERY_HISTORY` view is available on Business plans and requires permission to view query history. The Admin and Builder preset roles include this permission by default. The editable examples on this page show sample results; select **Run** to query your own organization's data.
:::
The [`MD_INFORMATION_SCHEMA.QUERY_HISTORY`](/sql-reference/motherduck-sql-reference/md_information_schema/query_history/) view records every query run across your organization. Use it to understand which users, queries, and duckling types are driving compute consumption.
For a visual overview, the [Duckling overview](/getting-started/interfaces/motherduck-quick-tour/#duckling-overview) page (**Settings** → **Duckling overview**) shows active minutes, query volume, spills, and errors per Duckling over the last 24 hours. Viewing it requires permission to view organization-wide Duckling activity, which the Admin and Builder preset roles include by default.

### Compute hours by duckling type
Summarize execution hours per duckling type over a given period. The example results below show what the output looks like; run the query to see your own organization's data.
#### Compute hours by duckling type
Database: `my_db`
```sql
SELECT
instance_type,
COUNT(*) AS query_count,
ROUND(SUM(EPOCH(execution_time)) / 3600, 2) AS execution_hours
FROM md_information_schema.query_history
WHERE start_time >= CURRENT_DATE - INTERVAL 30 DAYS
GROUP BY instance_type
ORDER BY execution_hours DESC;
```
:::note
Execution hours from `QUERY_HISTORY` approximate your billed compute but don't match it exactly. Standard and larger Ducklings are billed for wall-clock time, including startup and the [cooldown period](/about-motherduck/billing/pricing/#compute-pricing) after the last query. Pulse Ducklings are metered per query on CUs consumed.
:::
### Identify expensive queries
Find the longest-running queries to spot optimization opportunities. The `spilled_gb` column shows how much data each query [spilled to disk](https://duckdb.org/docs/stable/guides/performance/how_to_tune_workloads.html#spilling-to-disk) because it did not fit in memory: queries that spill run slower and cost more, and are a sign the workload needs a larger [Duckling size](/about-motherduck/billing/duckling-sizes/).
#### Longest-running queries in the past 7 days
Database: `my_db`
```sql
SELECT
query_id,
user_name,
instance_type,
execution_time,
total_elapsed_time,
ROUND(bytes_spilled_to_disk / 1e9, 2) AS spilled_gb,
LEFT(query_text, 200) AS query_preview
FROM md_information_schema.query_history
WHERE start_time >= CURRENT_DATE - INTERVAL 7 DAYS
ORDER BY execution_time DESC
LIMIT 20;
```
### Usage by user
Break down compute consumption per user to understand who is driving costs:
#### Compute usage by user
Database: `my_db`
```sql
SELECT
user_name,
instance_type,
COUNT(*) AS query_count,
ROUND(SUM(EPOCH(execution_time)) / 3600, 2) AS execution_hours
FROM md_information_schema.query_history
WHERE start_time >= CURRENT_DATE - INTERVAL 30 DAYS
GROUP BY user_name, instance_type
ORDER BY execution_hours DESC;
```
:::tip
To break usage down by pipeline, integration, or tenant rather than by user, set a custom user agent when connecting and group by the `user_agent` column. See [Tag workloads with custom user agents](/about-motherduck/billing/tag-workloads-with-custom-user-agents/).
:::
## Tracking storage usage
:::info
The `STORAGE_INFO` views require permission to view organization-wide storage information, which the Admin preset role includes by default.
:::
### Current storage by database
Use [`MD_INFORMATION_SCHEMA.STORAGE_INFO`](/sql-reference/motherduck-sql-reference/md_information_schema/storage_info/) to see storage across all databases:
#### Storage by database
Database: `my_db`
```sql
SELECT
database_name,
user_name,
transient,
ROUND(active_bytes / 1e9, 2) AS active_gb,
ROUND(historical_bytes / 1e9, 2) AS historical_gb,
ROUND(retained_for_clone_bytes / 1e9, 2) AS cloned_gb,
ROUND(failsafe_bytes / 1e9, 2) AS failsafe_gb,
ROUND((active_bytes + historical_bytes + retained_for_clone_bytes + failsafe_bytes) / 1e9, 2) AS total_gb
FROM md_information_schema.storage_info
ORDER BY total_gb DESC;
```
### Understanding storage byte types
Your storage bill includes several categories of bytes:
| Byte type | Description |
|-----------|-------------|
| `active_bytes` | Data referenced by the database: your live tables and indexes. |
| `historical_bytes` | Previous versions of data retained for [point-in-time restore](/concepts/data-recovery/). Controlled by `snapshot_retention_days`. |
| `retained_for_clone_bytes` | Bytes retained because another database (through zero-copy clone) still references them. |
| `failsafe_bytes` | Bytes kept for a minimum failsafe period after they are no longer referenced. |
All four categories count toward your storage bill. To reduce `historical_bytes`, you can lower the snapshot retention period on databases where long retention is not needed.
### Estimate monthly storage cost
Calculate an approximate monthly storage bill based on current usage (US East rates):
#### Estimated monthly storage cost
Database: `my_db`
```sql
SELECT
ROUND(SUM(active_bytes + historical_bytes + retained_for_clone_bytes + failsafe_bytes) / 1e9, 2) AS total_gb,
ROUND(SUM(active_bytes + historical_bytes + retained_for_clone_bytes + failsafe_bytes) / 1e9 * 0.04, 2) AS estimated_monthly_cost_usd
FROM md_information_schema.storage_info;
```
:::note
Storage is billed based on your **average daily usage** over the billing period, not a single point-in-time snapshot. Use [`STORAGE_INFO_HISTORY`](/sql-reference/motherduck-sql-reference/md_information_schema/storage_info/) for trend analysis over the past 30 days.
:::
You can also get a quick overview of database sizes using [`PRAGMA database_size`](/sql-reference/motherduck-sql-reference/md_information_schema/database_size/), though this does not break down storage by byte type.
## Understanding your bill
Your MotherDuck bill has three main components:
### Platform fee
- **Lite plan:** $0/month (includes 10 CU hours and 10 GB storage)
- **Business plan:** $250/month
### Compute charges
Compute is billed per CU hour for each duckling type. The CU hour rate varies by duckling size and region. See the [compute pricing table](/about-motherduck/billing/pricing/#compute-pricing) for current rates.
For example, if you consumed 50 CU hours on Standard in US East during a month:
50 hours x $2.40/hour = **$120.00**
### Storage charges
Storage is billed based on your average daily usage (in GB) over the billing period, multiplied by the per-GB rate. See the [storage pricing table](/about-motherduck/billing/pricing/#storage-pricing) for current rates.
For example, if your average storage over the month is 200 GB in US East:
200 GB x $0.04/GB = **$8.00**
You can view your current and past invoices on the [Billing page](https://app.motherduck.com/settings/billing) in the MotherDuck UI. Costs are broken down per user and per service account. See [Managing your bill](/about-motherduck/billing/managing-billing/) for details.
## Cost optimization tips
### Choose the right duckling size
- Use **Pulse** for small, bursty, read-heavy queries (ad-hoc analytics, data apps). Pulse bills per CU consumed, not wall-clock time, so short queries are very efficient.
- Use **Standard** or larger for sustained, compute-heavy workloads. Pulse can consume high volumes of CUs when scaling up for intensive queries.
- See [Duckling Sizes](/about-motherduck/billing/duckling-sizes/) for guidance on when to use each size.
### Reduce storage costs
- Use [`TRANSIENT` databases](/concepts/storage-lifecycle/#storage-management) for intermediate or reproducible data (for example, staging tables and job outputs). Transient databases retain only a 1-day failsafe minimum with no historical snapshots.
- Lower `snapshot_retention_days` on databases where you don't need long retention of historical snapshots. The default is 1 day on Lite and 7 days on Business (configurable up to 90 days).
- Shares and zero-copy clones (`CREATE DATABASE X FROM DATABASE Y`) do not incur additional storage. Only incremental changes to the cloned database add to storage.
### Write efficient queries
- Use `LIMIT` during data exploration to avoid scanning and returning more data than needed.
- Filter early with `WHERE` clauses to reduce the amount of data processed.
- Check `bytes_spilled_to_disk` in `QUERY_HISTORY`: if queries frequently spill to disk, consider a larger duckling size for faster execution. The [Duckling overview](/getting-started/interfaces/motherduck-quick-tour/#duckling-overview) page also flags Ducklings with spills.
### Plan resource usage
- Schedule heavy batch jobs during off-peak hours. While the per-hour cost is the same, this helps avoid resource contention with interactive users.
- Use [read scaling](/key-tasks/authenticating-and-connecting-to-motherduck/read-scaling/) (Business plan) to separate read-heavy workloads from write operations.
## See also
- [Understanding the pricing model](/about-motherduck/billing/pricing/)
- [Managing your bill](/about-motherduck/billing/managing-billing/)
- [Duckling sizes](/about-motherduck/billing/duckling-sizes/)
- [Optimizing query performance](/key-tasks/query-performance/)
---
Source: https://motherduck.com/docs/about-motherduck/billing/billing
# Billing
> Learn more about MotherDuck's pricing model and how to manage billing.
MotherDuck offers two [paid](https://motherduck.com/pricing/) self-service plans: Lite and Business.
View your Organization's incurred usage, track spend, and view your invoices.
All new users start on a 7-Day Free Trial with access to the full set of Business Plan features.
## Included pages
- [Pricing model](https://motherduck.com/docs/about-motherduck/billing/pricing): Details of MotherDuck's pricing model.
- [Manage billing](https://motherduck.com/docs/about-motherduck/billing/managing-billing): Learn how to manage your MotherDuck spend, choose plans, monitor usage, and view invoices.
- [Tag workloads with custom user agents](https://motherduck.com/docs/about-motherduck/billing/tag-workloads-with-custom-user-agents): Add workload tags with custom_user_agent and use QUERY_HISTORY to group activity by workload, tenant, or pipeline.
- [Duckling sizes](https://motherduck.com/docs/about-motherduck/billing/duckling-sizes): Learn about MotherDuck Duckling (compute instance) sizes and their optimal use cases.
- [Monitoring usage and costs](https://motherduck.com/docs/about-motherduck/billing/monitoring-usage): Track compute and storage usage in MotherDuck using SQL views, understand how usage maps to your bill, and find ways to optimize costs.
---
## Docs feedback
MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.
URL-encode query parameter values and send a GET request:
```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fabout-motherduck%2Fbilling%2F&page_title=MotherDuck%20Documentation%20-%20Pricing%20and%20Billing&text=
```
Optionally append `&source=` such as `claude.ai` or `chatgpt`.
`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": ""}`, `400` for malformed query parameters, and `429` when rate-limited.