[New Service] Technical Explanation of DuckDB Scales, an Extension for Running DuckDB Distributed Across Multiple Machines #AWSreInvent

[New Service] Technical Explanation of DuckDB Scales, an Extension for Running DuckDB Distributed Across Multiple Machines #AWSreInvent

DuckDB Scales, a DuckDB extension that runs a single query across multiple machines, is now in preview on Amazon Athena. DuckLabs measured a median of 57.1 seconds for 100 TB TPC-H on 256 workers. Diagrams explain how it works and the benchmarks.
2026.12.06

This page has been translated by machine translation. View original

I'm Ishikawa from the Cloud Business Division. On December 1, 2026, DuckLabs, the developer of DuckDB, announced DuckDB Scales at AWS re:Invent. DuckDB Scales is a DuckDB extension that splits a single query across multiple machines, and it is first available in the preview of Amazon Athena powered by DuckDB.

This article introduces the new service from a DuckDB perspective rather than an AWS one. It explains how distributed execution works, speculative execution, and performance. At the end, you get a glimpse of the future AWS Analytics service strategy.

https://duckdb.org/2026/12/01/duckdb-scales

Queries too large for the processing power of a single machine can now run on multiple machines while remaining plain DuckDB SQL.

What is DuckDB Scales?

DuckDB is an open-source analytical database that runs inside an application process, and until now it ran on a single machine. DuckDB Scales is an extension that runs a single query on multiple machines, targeting workloads that need more processing power than a single machine can practically provide. DuckLabs aims to make it capable of handling petabyte-scale workloads.

The DuckDB Scales Announcement


Source: AWS re:Invent 2026 - CEO Keynote with Matt Garman (Amazon Web Services) 00:53:00

Until now, DuckDB ran on a single machine. What was announced is DuckDB Scales (Scales for short). It lets a single DuckDB query run on many machines, for workloads that go beyond a single node. DuckDB splits the work across multiple machines (a fleet), runs each part on regular DuckDB, and combines the results into one.

According to Mr. Mühleisen, DuckDB Scales is neither a new product nor a fork, and it is not an AWS product. It is open source and provided as part of DuckDB. There is no need to install a new engine, learn a new SQL dialect, or build a cluster.

"If you can write the query on your laptop, you can run it at scale."
(If you can write the query on your laptop, you can run it at scale)


Source: AWS re:Invent 2026 - CEO Keynote with Matt Garman (Amazon Web Services) 00:53:39

The screen showed the text "Yes, it scales" along with a graph of "TPC-H Q1 at SF100,000". The horizontal axis is the number of workers (250 to 1,000) and the vertical axis is the execution time (seconds); the more workers there are, the shorter the execution time. Mr. Mühleisen explained that processing in parallel on 1,000 machines instead of 10 makes things faster with the same ease of use.

Update Details

The official DuckDB blog lists the following as announcements at AWS re:Invent.

  • DuckDB Scales: An extension that scales DuckDB out horizontally for workloads exceeding 100 TB. It is first provided in Amazon Athena, and the open-source version is planned for release in the first half of 2027
  • Amazon Athena powered by DuckDB: Lets you use DuckDB as a managed service in Amazon Athena. It is currently in preview, and general availability (GA) is planned for 2027
  • Athena extension and Redshift extension: Extensions developed with the AWS Athena and Redshift teams for connecting from DuckDB to each service. They are available from the AWS service repository (aws.amazon.com)

Below, I explain how DuckDB Scales works, quoting diagrams from DuckLabs' technical blog.

DuckDB Scales Architecture


Source: DuckLabs "DuckDB Scales: DuckDB for the Long-Tail of Workloads" (https://ducklabs.com/news/2026/12/01/duckdb-scales)

Following the arrows in the diagram, SQL and tasks are passed as follows.

  • Client → Coordinator (SQL): The Client (labeled "any DuckDB, over Quack" in the diagram) sends SQL to the coordinator
  • Catalog → Coordinator (file lists): The Catalog (DuckLake or Apache Iceberg) passes a list of files to the coordinator
  • Coordinator → Workers (tasks, as plain SQL): The coordinator (DuckDB and DuckDB Scales) passes tasks to the workers as plain SQL. The workers are stateless DuckDB instances, and "a Quack fleet" and AWS Lambda are listed as execution environments
  • Workers ↔ Object storage (read · write): Workers read from and write to Amazon S3 or shared disk. Table files and intermediate data (labeled duck_egg in the diagram) are placed here
  • Coordinator → Client (rows): The coordinator returns the result rows to the Client

In the diagram there are no arrows between the Client and the workers; the Client interacts only with the coordinator.

According to DuckLabs' technical blog, a worker receives a self-contained SQL statement targeting specific input files and builds its own execution plan. Results between stages are handed off by workers writing them as files to shared object storage, and workers do not communicate directly with each other.

Query Processing Flow


Source: DuckLabs "DuckDB Scales: DuckDB for the Long-Tail of Workloads" (https://ducklabs.com/news/2026/12/01/duckdb-scales)

A single query is processed in the following five steps.

  1. Plan (coordinator): Creates an execution plan
  2. Cut into stages (coordinator): Splits the optimized logical plan into multiple stages and tracks whether the inputs for each stage are ready
  3. Split into tasks (coordinator): Divides the stages into tasks
  4. Run on workers (workers): The workers execute the tasks
  5. Stream result (coordinator): Streams the result back

Main Features

Speculative execution

The coordinator first runs the entire query without workers in a single DuckDB process running next to the coordinator (original: next to the coordinator), and a few seconds later starts running the distributed plan on the cluster. It adopts the result of whichever finishes first and cancels the other. DuckLabs' blog does not say which machine the single DuckDB process runs on.

Distributed aggregation


Source: DuckLabs "DuckDB Scales: DuckDB for the Long-Tail of Workloads" (https://ducklabs.com/news/2026/12/01/duckdb-scales)

The diagram shows how an aggregation query is processed by multiple workers.

  1. Read data / Pre-aggregate: Each task reads files and performs partial aggregation
  2. Exchange: The partial aggregation results are written to object storage as buckets (A, B, and C in the diagram) divided by the hash value of the grouping columns. Partial results for the same group go into the same bucket
  3. Finalize: A task for each bucket (tasks A, B, and C) finalizes the aggregation
  4. Return result: The coordinator collects the final groups and returns the result rows

Fault tolerance and supported operations

Failed tasks are retried. Tasks are idempotent and delivered at least once, and if there are multiple results for the same task, the first one committed is adopted. Data skew is also handled.

It supports joins, window functions, and aggregations with many groups, and can also execute update queries such as INSERT, DELETE, and UPDATE. In Amazon Athena, the DuckDB engine can write to tables in the AWS Glue Data Catalog (INSERT INTO targets Hive tables and Iceberg tables, while UPDATE and DELETE target Iceberg tables). However, according to the Athena user guide, INSERT, UPDATE, and DELETE are not distributed across multiple workers and are executed on a single worker.

Benchmark Results

DuckLabs ran the TPC-H benchmark in the following environment.

Item Details
Dataset TPC-H scale factor 100,000 (100 TB as CSV files, about 866 billion rows in total)
Object storage Amazon S3 Express One Zone
Coordinator r8g.16xlarge (64 vCPU, 512 GiB)
Workers r8g.8xlarge (32 vCPU, 256 GiB)

Q1 execution time with varying numbers of workers


Source: DuckLabs "DuckDB Scales: DuckDB for the Long-Tail of Workloads" (https://ducklabs.com/news/2026/12/01/duckdb-scales)

Workers Execution time Compared with 64 workers
64 37.5 s -
128 21.1 s 1.78x faster
256 11.1 s 3.38x faster (84% efficiency)

The values in the graph are the median of three runs, and the dotted line (ideal) shows the values if execution time decreased in proportion to the number of workers. DuckLabs describes this result as scaling almost linearly. It also states that an end-to-end total scan speed of about 54 billion rows per second was achieved (the target query and number of workers are not specified).

Execution time of all 22 TPC-H queries with 256 workers


Source: DuckLabs "DuckDB Scales: DuckDB for the Long-Tail of Workloads" (https://ducklabs.com/news/2026/12/01/duckdb-scales)

The median execution time across the 22 queries is 57.1 seconds. Q1 takes 11.1 seconds, the longest, Q9, takes 328.7 seconds, followed by Q20 at 215.7 seconds (these two are shown with the tops of the bars omitted in the graph).

For comparison, in a measurement on the DuckDB Engineering blog, single-node DuckDB 1.4 LTS running on an i8g.48xlarge (192 vCPU, 1.5 TB RAM, 45 TB of NVMe in a RAID-0 configuration) had a median of 1.19 hours. Note that the hardware configurations of the two differ.

Use in Amazon Athena

According to DuckLabs' press release, in Amazon Athena powered by DuckDB, queries that fit on a single machine are run on the single-server engine, and for heavy workloads Athena automatically uses DuckDB Scales to distribute the processing across multiple DuckDB servers. Users do not choose the execution method, and in either case write the same DuckDB SQL.

The Athena user guide describes the conditions for running on multiple workers as follows.

  • The target is read-only queries that read Apache Iceberg tables in the AWS Glue Data Catalog or Hive tables in Parquet format
  • max-dpu-count must be 8 DPU or more, or unset. A single worker uses up to 4 DPU, and each additional worker adds 4 DPU
  • Statements other than SELECT, queries that read files by Amazon S3 path such as read_parquet or FROM 's3://...', queries that read views, and so on are run on a single worker (see the user guide for all conditions)

To get started, create a workgroup in the Athena console or switch an existing workgroup to DuckDB. The preview is available in five Regions including Tokyo (US East (N. Virginia), US East (Ohio), US West (Oregon), Europe (Ireland), and Asia Pacific (Tokyo)).

On the workgroup creation screen, select "Amazon Athena with DuckDB (Preview)" as the engine version.

Next: The next generation of analytics on AWS

DuckDB Scales is a DuckDB extension for running a single query on multiple servers. Amazon's article calls it a "plugin", while DuckLabs' press release and the duckdb.org blog call it an "extension".

https://www.aboutamazon.com/news/aws/amazon-athena-duckdb-faster-analytics-queries

According to Amazon's article, everyday queries continue to run on a single server. Large jobs are automatically distributed by Athena across multiple servers running DuckDB, and the results are combined. You can use the same query in both cases.


Source: AWS re:Invent 2026 - CEO Keynote with Matt Garman (Amazon Web Services) 00:55:41

Amazon Athena powered by DuckDB was announced as the first such service. The slide shows "Fast, scalable, governed SQL at a lower cost" and "IN PREVIEW TODAY". It is a service that builds DuckLabs' latest work into the fully managed Athena, letting you use DuckDB's speed and ease of use at AWS scale.

Summary of Availability

Here I separate what is available now from what has been announced as plans.

Name Type Status Details
Amazon Athena powered by DuckDB Athena SQL engine Preview Query data on Amazon S3 with DuckDB SQL
DuckDB Scales Distributed execution mechanism Preview in Athena Runs a single query on multiple servers
Athena extension for DuckDB DuckDB extension (Apache License 2.0) Available ATTACH an Athena workgroup from local DuckDB and run queries in Athena
Redshift extension for DuckDB DuckDB extension (Apache License 2.0) Available Run Amazon Redshift SQL from local DuckDB and receive the results as DuckDB tables
DuckDB on Amazon EMR Plan No timing stated Run DuckDB alongside existing tools
DuckDB embedded in Amazon Redshift Plan No timing stated Embed DuckDB directly in Amazon Redshift
Expansion to other services Plan Throughout 2027 Target service names not announced

The preview of Amazon Athena powered by DuckDB is available in five Regions: US East (N. Virginia), US East (Ohio), US West (Oregon), Europe (Ireland), and Asia Pacific (Tokyo).

Plans for Expansion to Amazon EMR and Amazon Redshift

The "Athena is just the start" section of Amazon's article says the following about services other than Athena.

  • On Amazon EMR, DuckDB will be able to run alongside the tools customers already use
  • DuckDB will be embedded directly in Amazon Redshift
  • Expansion to other services throughout 2027

The availability timing for Amazon EMR and Amazon Redshift is not stated. "2027" is attached to "other services".

The article gives the example of an agent at a retail company. When an agent needs both sales data in Amazon Redshift and supplier shipment data processed in Amazon EMR, it currently may have to write two versions of the same query. If both services use DuckDB SQL, the agent can write the query once and run it on each service. A feature for joining data from both services in a single SQL statement is not mentioned.

Usage Notes

  • DuckDB Scales is not suited to small queries. According to DuckLabs' FAQ, there is a fixed cost of several hundred milliseconds per query, and small queries finish faster on regular DuckDB. Thanks to speculative execution, for small queries the execution in the single DuckDB process completes first
  • DuckDB Scales is first provided in the Amazon Athena preview. The open-source version is planned for release in the first half of 2027, together with detailed documentation
  • The benchmarks above are measurement results by DuckLabs in an environment built with Amazon EC2 and Amazon S3 Express One Zone. It is not stated whether the same performance is achieved in the Amazon Athena preview
  • In the preview, MERGE INTO cannot be used to update Iceberg tables. Compaction of Iceberg tables (OPTIMIZE) and removal of old snapshots (VACUUM) are run in a workgroup with Athena engine version 3

Conclusion

DuckDB Scales is an extension that runs a single query on multiple workers without changing DuckDB SQL. The coordinator divides the query into stages and tasks, and workers write files to shared object storage to hand off results between stages. In speculative execution, both a single DuckDB process and the distributed plan are run and whichever finishes first is adopted, so for small queries the single-process execution completes first. In DuckLabs' benchmark, 100 TB of TPC-H is run with 256 workers at a median of 57.1 seconds. At present it is available in the preview of Amazon Athena powered by DuckDB, and the open-source version is planned for release in the first half of 2027.

In Amazon Athena powered by DuckDB, for heavy workloads Athena automatically uses DuckDB Scales to distribute the processing, and users write the same DuckDB SQL without choosing the execution method. What can run on multiple workers are read-only queries that read Iceberg tables in the AWS Glue Data Catalog or Hive tables in Parquet format.

As Amazon's article says in "Athena is just the start", Athena is the first service to adopt DuckDB. Going forward, the plan is to enable DuckDB to run alongside existing tools on Amazon EMR, embed DuckDB directly in Amazon Redshift, and expand to other services throughout 2027. If Amazon Redshift and Amazon EMR come to use DuckDB SQL, an agent can write a query once and run it on each service.

If you have large aggregation queries that take a long time on single-node DuckDB, why not try queries against Iceberg tables in the AWS Glue Data Catalog in the preview of Amazon Athena powered by DuckDB, which is also available in the Tokyo Region?

https://dev.classmethod.jp/articles/20260922-duckdb-v20-alpha-quack/

https://dev.classmethod.jp/articles/20260925-dbtv2-duckdb-cloudshell/

https://dev.classmethod.jp/articles/20261201-amazon-athena-now-powered-by-duckdb/

https://dev.classmethod.jp/articles/20261202-amazon-athena-with-duckdb/

https://dev.classmethod.jp/articles/20261203-amazon-redshift-duckdb-extension/


AWS re:Invent 2026まとめ情報

クラスメソッドは2026/11/30〜12/4にラスベガスで開催されるAWSカンファレンスイベント「re:Invent」を今年も特集しました。ぜひ一度ご覧ください。 re:Invent 2026ポータルサイトを見るAWS re:Invent公式サイトはこちら

Share this article

AWSのお困り事はクラスメソッドへ