게시 2026-12-03Published 2026-12-03Data Analytics읽는 시간 15분15 min read직접 테스트: 도쿄 리전, TPC-H에서 가져온 쿼리 22개, 10GB와 100GB는 5회, 200GB와 500GB는 3회, 3TB는 1회 실행Tested first-hand: Tokyo Region, 22 queries derived from TPC-H, 5 runs at 10GB and 100GB, 3 runs at 200GB and 500GB, 1 run at 3TB

Amazon Athena powered by DuckDB의 성능과 비용Performance and Cost of Amazon Athena powered by DuckDB

DuckDB 엔진으로 옮기면 요금의 기준이 스캔한 데이터에서 쿼리가 사용한 연산 시간으로 바뀌어 비용은 데이터 크기와 관계없이 줄지만 속도는 데이터가 클 때만 빨라집니다. 도쿄 리전에서 같은 Parquet 테이블과 같은 SQL 22개를 엔진 버전 3과 DuckDB 엔진에 실행해 직접 비교해 보았습니다. 비용은 가장 작은 규모부터 가장 큰 규모까지 모두 60% 넘게 줄었습니다. 속도는 데이터가 작을 때 엔진 버전 3이 빠르거나 비슷했고 500GB 근처에서 합계가 같아졌으며 가장 큰 규모에서 DuckDB 엔진이 빨랐습니다. 순서를 바꾼 것은 큰 테이블을 조인하고 다시 집계하는 일부 쿼리였습니다. 가장 큰 규모는 한 번만 실행했고 중간 규모는 작은 테이블을 복사해 만든 데이터에서 나온 결과입니다.Moving to the DuckDB engine changes the billing basis from data scanned to the compute time a query uses, so the cost falls at every data size while speed improves only when the data is large. I ran the same 22 SQL texts on the same Parquet tables on engine version 3 and on the DuckDB engine in the Tokyo Region and compared them myself. Cost fell by more than 60% at every scale, from the smallest to the largest. In speed, engine version 3 was faster or about the same on small data, the totals were level at about 500GB, and the DuckDB engine was faster at the largest scale. What changed the order was a few queries that join large tables and aggregate them again. The largest scale was run only once, and the results at the middle scales come from data built by copying smaller tables.

#Amazon Athena#DuckDB#Athena engine version 3#DPU#TPC-H#Parquet

스캔 규모에서 연산 시간으로 바뀐 요금 기준

AWS는 2026년 12월 1일에 Amazon Athena의 새 쿼리 엔진인 DuckDB 엔진을 프리뷰로 발표했습니다. 발표문은 큰 데이터에서 기존 엔진 버전 3보다 쿼리가 최대 2배 빠르고 비용이 최대 50% 적다고 소개합니다.

DuckDB 엔진으로 옮기면 쿼리 요금을 계산하는 기준부터 달라집니다. 두 엔진을 직접 비교해 보니 이 변화로 비용은 데이터 크기와 관계없이 줄었습니다. 속도는 그렇지 않았습니다. 데이터가 작을 때는 엔진 버전 3이 빨랐고 수백 GB 규모에서 두 엔진이 같아졌으며 테라바이트 규모에서는 DuckDB 엔진이 빨랐습니다. 순서를 바꾼 것은 큰 테이블을 조인하고 다시 집계하는 일부 쿼리였습니다. 응답 시간이 중요한 작은 쿼리와 비용이 중요한 큰 쿼리는 따로 판단해야 합니다.

엔진 버전 3은 쿼리가 스캔한 데이터의 양으로 요금을 계산합니다. 그래서 비용을 줄이는 방법은 스캔을 줄이는 것이었습니다. 파티션을 나누고 Parquet 같은 열 형식으로 저장하고 압축률을 높였습니다. 조인이 많아 오래 걸리는 쿼리도 읽은 데이터가 같으면 요금이 같았습니다.

DuckDB 엔진은 쿼리가 사용한 연산 시간으로 요금을 계산합니다. 단위는 DPU(Data Processing Unit) 시간입니다. DPU는 쿼리를 처리하는 CPU와 메모리를 묶은 단위이고 요금 페이지는 1 DPU를 보통 4 vCPU와 메모리 16GB로 설명합니다. 1 DPU를 한 시간 사용하면 1 DPU 시간입니다. 쿼리에 DPU를 몇 개 쓸지는 Athena가 쿼리마다 정하고 사용자는 워크그룹에서 상한과 하한만 지정합니다. 같은 데이터를 읽어도 오래 계산하는 쿼리는 요금이 늘고 많이 읽고 짧게 끝나는 쿼리는 요금이 줄어듭니다.

전체 시험 구성. 측정 클라이언트가 같은 SQL 22개를 엔진 버전 3 워크그룹과 DuckDB 워크그룹에 보내고 두 엔진이 AWS Glue Data Catalog의 같은 테이블 정의로 Amazon S3의 Parquet 파일을 읽는 구조
그림 1. 전체 시험 구성. 두 워크그룹이 같은 Parquet 테이블을 조회하고 과금 기준만 다릅니다

발표문의 수치에는 "큰 데이터"와 "최대"라는 조건이 붙어 있고 측정 방법은 나와 있지 않습니다. 남은 것은 데이터가 얼마나 커야 빨라지는지와 어떤 쿼리에서 비용이 줄고 어떤 쿼리에서 늘어나는지입니다.

01

같은 테이블과 같은 SQL로 맞춘 시험 환경

데이터는 AWS가 공개 S3 버킷에 올려 둔 TPC-H 텍스트 데이터를 사용했습니다. 10GB, 100GB, 3TB 세 규모를 엔진 버전 3의 CTAS(CREATE TABLE AS SELECT)로 읽어 도쿄 리전 버킷에 Parquet(SNAPPY 압축)로 변환했습니다. 테이블 8개는 파티션 없이 만들었고 AWS Glue 열 통계는 만들지 않았습니다. 변환 뒤에 두 엔진에서 테이블별 행 수를 세어 TPC-H 규격의 행 수와 같은지 확인했습니다.

sql
create table adb_tpch_sf100.lineitem
with (format = 'PARQUET', write_compression = 'SNAPPY',
      external_location = 's3://athena-duckdb-lab-<account-id>-apne1/tpch/sf100/lineitem/')
as select l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice,
          l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate,
          l_receiptdate, l_shipinstruct, l_shipmode, l_comment
from adb_src.sf100_lineitem

공개 데이터에는 100GB와 3TB 사이의 크기가 없습니다. 속도가 뒤집히는 크기를 찾으려고 100GB 테이블을 2번, 5번 복사해 200GB와 500GB 테이블을 만들었습니다. 복사본마다 모든 키에 100GB의 키 범위를 더해 키가 겹치지 않게 했으므로 조인 결과의 행 수와 그룹 수는 100GB의 2배와 5배입니다. 금액과 날짜 값은 복사본마다 같아서 생성기로 만든 데이터와는 다릅니다. 만든 뒤에 행 수, 키의 중복과 범위, 외래 키에 짝이 없는 행이 없는지 확인했습니다.

sql
-- 200GB의 orders에 두 번째 복사본 넣기: 주문 키와 고객 키에 100GB의 키 범위를 더함
insert into adb_tpch_sf200.orders
select o_orderkey + 600000000 as o_orderkey, o_custkey + 15000000 as o_custkey, o_orderstatus,
       o_totalprice, o_orderdate, o_orderpriority, o_clerk, o_shippriority, o_comment
from adb_tpch_sf100.orders

워크그룹은 엔진마다 하나씩 만들었습니다. DuckDB 워크그룹은 엔진 이름만 지정하고 나머지는 기본값으로 두었습니다. 기본값에서는 Athena가 쿼리마다 DPU 수를 정하고 결과는 Athena가 관리하는 저장소(managed query results)에 보관됩니다.

bash
# 엔진 버전 3 워크그룹: 결과를 내 버킷에 저장
aws athena create-work-group --name adb-lab-v3 --region ap-northeast-1 \
  --configuration '{"EngineVersion":{"SelectedEngineVersion":"Athena engine version 3"},
    "ResultConfiguration":{"OutputLocation":"s3://athena-duckdb-lab-<account-id>-apne1/results/v3/"},
    "EnforceWorkGroupConfiguration":true,"PublishCloudWatchMetricsEnabled":true}'

# DuckDB 워크그룹: 엔진만 지정
aws athena create-work-group --name adb-lab-duckdb --region ap-northeast-1 \
  --configuration '{"EngineVersion":{"SelectedEngineVersion":"DuckDB"}}'

쿼리는 TPC-H의 22개 쿼리에 규격의 검증용 매개변수를 넣어 사용했습니다. 날짜 연산은 계산한 날짜 값으로 바꿔 적어 두 엔진에 같은 SQL 문장을 보냈습니다. 엔진마다 Q1부터 Q22까지 한 번에 하나씩 순서대로 실행했고 두 엔진의 실행은 같은 시간에 진행했습니다. 10GB와 100GB는 5회, 3TB는 비용 때문에 1회 실행했습니다. 아래에서는 이 실행을 본 측정이라고 부릅니다. 200GB와 500GB는 그 뒤에 3회씩 실행했고 200GB는 100GB와 번갈아 실행해 같은 시간대의 100GB 값도 다시 얻었습니다. 이 글의 수치는 TPC-H에서 가져온 데이터와 쿼리로 한 비교이고 TPC-H 공식 결과와 비교할 수 없습니다.

속도는 GetQueryExecution이 돌려주는 전체 실행 시간(TotalExecutionTimeInMillis)으로 비교했습니다. 대기, 계획, 실행, 결과 처리 시간이 모두 들어간 값이고 Athena가 기록한 시간이어서 클라이언트의 위치는 영향을 주지 않습니다. 비용은 청구서가 아닌 같은 응답의 통계로 계산했습니다. 엔진 버전 3은 스캔한 바이트(DataScannedInBytes)를 MB 단위로 올림하고 최소 10MB를 적용해 1TB당 5.00달러를 곱했습니다. DuckDB 엔진은 DPU 사용 시간(DpuConsumedInMillis)에 DPU 시간당 0.35달러를 곱했습니다. 두 단가는 2026년 12월 3일에 AWS Price List API에서 조회한 도쿄 리전 값입니다.

json
// 엔진 버전 3, 10GB의 Q5
"Statistics": {
  "DataScannedInBytes": 843951569,
  "EngineExecutionTimeInMillis": 2234,
  "QueryPlanningTimeInMillis": 452,
  "QueryQueueTimeInMillis": 57,
  "TotalExecutionTimeInMillis": 2370
}

// DuckDB 엔진, 같은 쿼리
"EngineConfiguration": { "Classifications": [ { "Name": "athena-execution-properties",
  "Properties": { "max-dpu-count": "124", "min-dpu-count": "0.25" } } ] },
"Statistics": {
  "DataScannedInBytes": 6947375,
  "DpuConsumedInMillis": 51112,
  "DpuCount": 20.0,
  "EngineExecutionTimeInMillis": 3563,
  "QueryPlanningTimeInMillis": 598,
  "QueryQueueTimeInMillis": 114,
  "TotalExecutionTimeInMillis": 3807
}

이 응답으로 계산하면 엔진 버전 3은 805MB를 스캔해 0.00384달러, DuckDB 엔진은 51.1 DPU초를 사용해 0.00497달러입니다. DpuCount는 쿼리가 실행되는 동안 동시에 사용한 DPU의 최대값이고 DpuConsumedInMillis는 사용량의 합계입니다.

설치되어 있던 AWS CLI 2.42.1은 응답에서 DPU 필드를 보여 주지 않았습니다. 사용 설명서도 2026년 12월 1일 전에 나온 CLI와 SDK에는 새 매개변수와 새 API가 없다고 안내합니다. 그래서 Athena API를 SigV4 서명으로 직접 호출해 응답을 그대로 저장했습니다. DPU 통계는 쿼리가 끝난 직후에는 비어 있었고 2분쯤 뒤에 다시 조회하면 채워져 있었습니다.

02

큰 규모의 일부 쿼리에 그친 속도 향상

22개 쿼리의 합계 시간은 10GB에서 두 엔진이 비슷했고 100GB와 200GB에서는 엔진 버전 3이 빨랐습니다. 500GB에서 두 엔진이 같아졌고 3TB에서는 DuckDB 엔진이 빨랐습니다. 표 1은 쿼리마다 구한 실행 시간을 22개 더한 값입니다.

규모엔진 버전 3 (초)DuckDB 엔진 (초)속도 배율쿼리별 기하평균쿼리별 범위2배 이상 빠른 쿼리빨라진 쿼리느려진 쿼리
10GB52.154.10.960.990.55~1.7401111
100GB99.5138.20.720.690.39~1.480418
200GB136.8179.00.760.710.41~1.690418
500GB266.3260.21.020.870.42~3.822715
3TB3,150.91,101.82.861.150.28~12.9261111

표 1. 22개 쿼리의 실행 시간 합계와 속도 배율(엔진 버전 3의 시간 ÷ DuckDB 엔진의 시간). 10GB와 100GB는 5회, 200GB와 500GB는 3회 실행의 중앙값, 3TB는 1회 실행

100GB에서는 22개 가운데 18개가 느려졌고 2배 넘게 빨라진 쿼리는 없었습니다. 가장 많이 느려진 쿼리는 lineitem 테이블 하나만 읽는 Q6으로, 1.94초가 4.93초가 됐습니다.

3TB의 합계는 2.86배이지만 이 값은 쿼리 두 개가 만들었습니다. 엔진 버전 3은 Q17에 1,291초, Q18에 621초가 걸렸고 두 쿼리가 전체 시간의 61%입니다. DuckDB 엔진은 같은 쿼리를 100초와 53초에 끝냈습니다. 두 쿼리를 빼면 배율은 1.30배이고 쿼리별 기하평균은 1.15배입니다.

text
$ python3 scripts/bench.py run --engine v3 --scale sf3000 --runs 1 --label main --budget 30
  run 1 q17 SUCCEEDED total=1291346ms engine=1291149ms scanned=242625219831 spent<=18.22
  run 1 q18 SUCCEEDED total=620857ms engine=620666ms scanned=149294226581 spent<=18.90

$ python3 scripts/bench.py run --engine duckdb --scale sf3000 --runs 1 --label main --budget 30
  run 1 q17 SUCCEEDED total=99911ms engine=99628ms scanned=3230208403 spent<=4.66
  run 1 q18 SUCCEEDED total=52536ms engine=52291ms scanned=149294226581 spent<=4.97

로그의 scanned는 스캔한 바이트이고 spent는 측정 스크립트가 그때까지 누적한 비용의 상한(달러)입니다.

3TB에서도 22개 가운데 11개는 DuckDB 엔진이 느렸습니다. 2배 넘게 빨라진 6개(Q3, Q5, Q13, Q17, Q18, Q21)는 큰 테이블끼리 조인하거나 하위 쿼리로 lineitem을 다시 집계하는 쿼리입니다. lineitem 하나를 훑어 집계하는 Q1과 Q6은 엔진 버전 3이 각각 1.9배, 2.0배 빨랐습니다.

규모별 쿼리 22개의 속도 배율과 비용 비율 분포. 10GB에서는 점이 속도 배율 1의 양쪽에, 100GB에서는 왼쪽에 모여 있고 3TB에서는 속도 배율 0.28에서 12.9까지 퍼져 있음. 세 규모 모두 대부분의 점이 비용 비율 0.5 아래에 있음
그림 2. 쿼리별 속도 배율과 비용 비율. 오른쪽 아래가 DuckDB 엔진이 빠르고 저렴한 영역이고 주황색 점선이 발표문의 기준입니다

그림 2는 본 측정의 세 규모를 그린 것입니다. 10GB의 점은 세로선 1의 양쪽에, 100GB의 점은 왼쪽에 모여 있고 3TB에서만 오른쪽으로 넓게 퍼집니다. 세로 방향으로는 세 규모 모두 대부분의 점이 0.5 아래에 있습니다. 속도는 규모와 쿼리에 따라 갈렸고 비용은 거의 모든 쿼리에서 줄었다는 뜻입니다.

03

500GB에서 뒤집힌 합계 속도와 원인 쿼리

합계 속도가 뒤집히는 크기는 500GB 근처였습니다. 3TB에서 엔진 버전 3의 시간이 가장 길었던 Q5, Q17, Q18, Q21과 나머지 18개를 따로 더하면 두 쿼리 그룹의 방향이 반대입니다.

규모실행 횟수속도 배율네 쿼리 (Q5, Q17, Q18, Q21): 엔진 버전 3 (초)네 쿼리: DuckDB (초)네 쿼리의 배율나머지 18개: 엔진 버전 3 (초)나머지 18개: DuckDB (초)나머지 18개의 배율
10GB50.9612.210.31.1839.943.70.91
100GB50.7233.831.21.0865.7107.00.61
100GB (다시 측정)30.6632.729.71.1057.3106.40.54
200GB30.7649.849.81.0087.0129.20.67
500GB31.02120.963.91.89145.4196.30.74
3TB12.862,474.8322.77.67676.0779.10.87

표 2. 규모별 속도 배율을 네 쿼리와 나머지 18개로 나눈 값. 배율은 엔진 버전 3의 시간 ÷ DuckDB 엔진의 시간이고 "100GB (다시 측정)"은 200GB와 번갈아 실행한 값

네 쿼리는 200GB에서 두 엔진이 같았고 500GB에서 DuckDB 엔진이 1.89배, 3TB에서 7.67배 빨랐습니다. 나머지 18개의 합계는 모든 규모에서 엔진 버전 3이 빨랐고 3TB에서도 0.87배였습니다. 합계가 뒤집힌 것은 네 쿼리가 엔진 버전 3의 시간에서 차지하는 비율이 100GB 34%, 500GB 45%, 3TB 79%로 커졌기 때문입니다.

500GB의 1.02배는 쿼리별 중앙값을 더한 값입니다. 엔진 버전 3은 500GB에서 실행마다 서로 다른 한두 쿼리가 중앙값의 1.7배에서 5.0배 걸렸습니다. 22개를 한 번씩 실행한 합계로 비교하면 세 번 모두 DuckDB 엔진이 1.16배에서 1.22배 빨랐습니다.

이유는 엔진 버전 3의 스테이지 통계에서 찾았습니다. 엔진 버전 3은 쿼리를 여러 스테이지(stage)로 나누고 스테이지마다 많은 태스크를 동시에 실행합니다. GetQueryRuntimeStatistics가 돌려주는 스테이지별 실행 시간을 한 쿼리에서 더하면 경과 시간의 수백 배입니다. 이 합계를 경과 시간으로 나눈 값을 엔진 버전 3이 일을 나눠 실행한 폭으로 봤습니다. 문서에 정의가 없어 이 해석은 추정입니다. DuckDB 엔진은 스테이지 통계를 돌려주지 않아 DPU 사용량을 함께 적었습니다.

규모네 쿼리: 스테이지 시간 합계 (초)네 쿼리: 경과 1초당 (초)나머지 18개: 스테이지 시간 합계 (초)나머지 18개: 경과 1초당 (초)DuckDB: DPU 사용량 (DPU초)DuckDB: 60 DPU 실행 수 / 전체
10GB3,5093108,5192322540 / 110
100GB22,10767247,5157642,90121 / 110
200GB41,08984383,3661,0015,69729 / 66
500GB113,456944184,9281,30212,54551 / 66
3TB1,916,0417741,016,6741,51264,03322 / 22

표 3. 엔진 버전 3의 스테이지 시간과 DuckDB 엔진의 DPU 사용량. 스테이지 시간은 쿼리마다 실행 시간이 중앙값인 실행에서 읽었고 DPU초와는 단위가 달라 서로 비교할 수 없습니다. 경과 1초당은 스테이지 시간 합계 ÷ 경과 시간

10GB에서 100GB로 데이터가 10배가 될 때 엔진 버전 3의 합계 시간은 1.9배만 늘었습니다. 경과 1초당 스테이지 시간이 네 쿼리에서 2.2배, 나머지 18개에서 3.3배가 됐으니 일을 더 넓게 나눠 실행한 것입니다. DuckDB 엔진은 DPU 사용량이 11.4배, 시간이 2.6배 늘었습니다. 10GB에서는 대부분 1 DPU짜리 워커 하나로 끝나던 쿼리가 100GB에서는 여러 워커로 실행됐고 05 챕터에서 보듯이 워커를 늘린 만큼 시간이 줄지는 않았습니다. 10GB에서 두 엔진이 비슷했던 것은 쿼리 하나가 5초 안에 끝나 대기와 계획 같은 고정 시간이 합계의 4분의 1을 넘었기 때문입니다.

100GB부터는 두 쿼리 그룹이 갈렸습니다. 나머지 18개에서 엔진 버전 3은 경과 1초당 스테이지 시간을 3TB까지 계속 늘렸고 그래서 시간이 데이터보다 천천히 늘었습니다. 네 쿼리에서는 이 값이 1,000초를 넘지 못했습니다. 네 쿼리의 스테이지 시간 합계는 100GB에서 3TB 사이에 87배가 됐는데 데이터는 30배였습니다. 같은 구간에서 DuckDB 엔진이 네 쿼리에 쓴 DPU 사용량은 24배였습니다. 네 쿼리는 모두 lineitem을 값의 종류가 많은 키로 조인하거나 묶습니다. Q17은 부품별 평균 수량을, Q18은 주문별 수량 합계를 구하는데 3TB에는 부품이 6억 개, 주문이 45억 건 있습니다. 엔진 버전 3에서 이 연산의 스테이지 시간이 데이터보다 빨리 늘어난 원인은 확인하지 못했습니다.

DuckDB 엔진에서는 데이터가 커질수록 더 많은 실행이 60 DPU를 받았고 200GB에서 500GB 사이의 합계 시간은 1.5배만 늘었습니다. 3TB에서는 22개가 모두 60 DPU였고 도쿄 리전에서는 그보다 많이 받을 수 없습니다. 더 큰 데이터에서는 DuckDB 엔진의 시간도 데이터에 비례해 늘 것으로 추정합니다.

04

모든 규모에서 절반을 밑돈 비용

22개 쿼리를 한 번씩 실행한 비용은 10GB부터 200GB까지 64%, 500GB에서 69%, 3TB에서 74% 줄었습니다. 발표문의 "최대 50%"보다 큰 폭이고 데이터가 작을 때도 같았습니다.

규모엔진 버전 3 스캔 (GiB)엔진 버전 3 비용 (USD)DuckDB DPU 시간DuckDB 비용 (USD)비용 비율1달러당 쿼리 수 (엔진 버전 3)1달러당 쿼리 수 (DuckDB)50% 이상 저렴한 쿼리더 비싼 쿼리
10GB14.20.06940.0700.02470.36317.0892.1182
100GB158.80.77530.8060.28210.3628.478.0161
200GB317.71.55111.5820.55380.3614.239.7151
500GB794.33.87833.4851.21960.315.718.0191
3TB4,948.124.160617.7876.22540.260.93.5200

표 4. 22개 쿼리를 한 번씩 실행한 비용과 1달러당 쿼리 수. API 통계에 도쿄 리전 단가를 곱한 계산값이고 청구서와 대조하지 않았습니다. 비용 비율은 DuckDB 엔진 ÷ 엔진 버전 3

100GB에서 DuckDB 엔진은 39% 더 오래 걸렸지만 같은 1달러로 2.7배 많은 쿼리를 실행했습니다. 3TB에서는 더 빠르면서 1달러당 쿼리 수가 3.9배였습니다.

두 요금제의 손익분기는 단가에서 나옵니다. 엔진 버전 3이 1GiB를 스캔하면 0.0049달러입니다. DuckDB 엔진은 이 금액으로 50.2 DPU초를 사용합니다. 스캔한 1GiB당 DPU 사용량이 이보다 적으면 DuckDB 엔진이 저렴합니다. 측정한 쿼리의 중앙값은 10GB에서 3.7 DPU초였고 100GB부터 3TB까지는 12.7 DPU초에서 17.4 DPU초였습니다.

DuckDB 엔진이 더 비쌌던 쿼리는 110개 가운데 5개입니다. 10GB의 Q5와 Q8, 그리고 100GB, 200GB, 500GB의 Q16이고 비용은 1.29배에서 1.75배였습니다. 모두 스캔 규모가 작은데 Athena가 12 DPU에서 40 DPU를 배정한 경우입니다. 반대로 많이 읽고 짧게 끝나는 쿼리는 차이가 큽니다. 3TB의 Q15는 엔진 버전 3에서 480GiB를 스캔해 2.34달러였고 DuckDB 엔진에서는 0.20달러였습니다.

두 엔진의 비용 차이는 Parquet 파일을 어떻게 압축했는지에 따라 달라집니다. 엔진 버전 3은 스캔한 바이트로 요금을 계산하므로 같은 데이터를 더 작게 압축하면 요금도 줄어듭니다. 이 차이를 확인하려고 100GB 테이블을 ZSTD로 다시 만들어 22개 쿼리를 3회씩 실행했습니다.

압축 (100GB)Parquet 크기 (GiB)엔진 버전 3 스캔 (GiB)엔진 버전 3 비용 (USD)DuckDB 비용 (USD)비용 비율엔진 버전 3 시간 (초)DuckDB 시간 (초)
SNAPPY (본 측정)35.35158.80.77530.28210.3699.5138.2
ZSTD23.1597.50.47600.20760.44119.7131.5

표 5. 100GB 테이블을 SNAPPY와 ZSTD로 압축했을 때 22개 쿼리의 비용과 시간. SNAPPY는 본 측정 5회, ZSTD는 3회 실행이고 비용 비율은 DuckDB 엔진 ÷ 엔진 버전 3

ZSTD 테이블은 Parquet 크기가 35% 작았고 엔진 버전 3의 비용은 39% 줄었습니다. DuckDB 엔진의 비용도 26% 줄었습니다. 22개 가운데 13개 쿼리가 SNAPPY 테이블에서보다 적은 DPU를 받았습니다. 본 측정의 100GB에서 한 번도 없던 1 DPU 실행도 Q2, Q11, Q22에서 나왔습니다. 사용 설명서는 워커 구성이 SQL 문, 쿼리가 읽는 데이터, Athena가 고른 연산 크기에 따라 정해진다고 설명하고 크기를 고르는 기준은 밝히지 않습니다. 이 결과를 보면 읽을 파일의 크기가 그 기준에 들어가는 것으로 추정합니다.

두 엔진의 비용 차이는 64%에서 56%로 좁아졌습니다. 지금 쓰는 테이블이 ZSTD처럼 압축률이 높은 방식이라면 엔진을 옮겨 줄어드는 비용의 폭은 표 4보다 작습니다. 엔진 버전 3의 합계 시간은 같은 SNAPPY 파일로 다시 측정했을 때도 13%까지 달라졌습니다. ZSTD 테이블에서 20% 늘어난 시간이 압축 때문인지는 구분하지 못했습니다.

05

비용을 좌우한 Athena의 DPU 배정

DuckDB 엔진에서 같은 쿼리의 비용은 Athena가 그 실행에 배정한 DPU 수에 따라 달라졌습니다. DPU를 많이 받은 실행이 그만큼 빨리 끝나지는 않았습니다. 표 6은 쿼리가 받은 DPU 수(DpuCount)의 분포입니다.

쿼리가 받은 DPU 수10GB (실행 수)100GB (실행 수)200GB (실행 수)500GB (실행 수)3TB (실행 수)
1 DPU750000
4 DPU15451230
8~28 DPU2014630
32~56 DPU0301990
60 DPU021295122
합계110110666622

표 6. 쿼리가 받은 DPU 수의 분포. DPU 상한을 지정하지 않은 워크그룹

10GB에서는 대부분의 실행이 1 DPU였고 3TB에서는 22개 쿼리가 모두 도쿄 리전의 최대값인 60 DPU를 받았습니다. 문서에 따르면 워커 하나는 4 DPU까지 사용하고 그보다 큰 크기에서는 4 DPU짜리 워커가 더해져 여러 워커가 쿼리를 나눠 처리합니다.

100GB에서는 같은 쿼리가 실행마다 다른 크기를 받았습니다. 22개 가운데 10개 쿼리는 5회 중 일부가 워커 하나로, 나머지가 여러 워커로 실행됐습니다. Q21은 워커 하나일 때 8.38초, 60 DPU일 때 9.25초였고 비용은 13.9배였습니다. 10개 쿼리에서 여러 워커로 실행한 쪽의 시간은 워커 하나의 0.92배에서 1.55배였고 비용은 4.6배에서 13.9배였습니다. 원인은 확인하지 못했습니다. 문서에는 추가 워커가 제때 준비되지 않으면 쿼리가 워커 하나로 실행될 수 있다는 설명이 있습니다. 프리뷰 기간에는 같은 쿼리의 DPU 통계가 달라질 수 있다는 안내도 있습니다.

그래서 DPU 상한(max-dpu-count)을 4, 16, 32로 정한 워크그룹에서 100GB를 3회씩 다시 실행했습니다. 아래는 상한을 4로 정하는 명령이고 16과 32는 값만 바꿨습니다.

bash
aws athena create-work-group --name adb-lab-duckdb-dpu4 --region ap-northeast-1 \
  --configuration '{"EngineVersion":{"SelectedEngineVersion":"DuckDB"},
    "EngineConfiguration":{"Classifications":[{"Name":"athena-execution-properties",
      "Properties":{"max-dpu-count":"4"}}]}}'
조건 (100GB)실행 횟수22개 쿼리 합계 (초)비용 (USD)DPU 시간가장 큰 DPU 수
엔진 버전 3, 본 측정599.50.7753--
엔진 버전 3, 단독 실행3102.10.7753--
DuckDB, 본 측정 (상한 없음)5138.20.28210.80660
DuckDB, 단독 실행 (상한 없음)3135.90.25830.73860
DuckDB, 상한 32 DPU3140.10.21940.62732
DuckDB, 상한 16 DPU3154.90.15320.43816
DuckDB, 상한 4 DPU3157.30.05780.1654

표 7. 100GB에서 DPU 상한을 바꿔 실행한 22개 쿼리의 합계. 시간은 쿼리별 중앙값을 더한 값이고 비용은 22개를 한 번씩 실행한 금액

상한을 낮출수록 비용은 줄었고 시간은 그만큼 늘지 않았습니다. 상한 4에서는 본 측정보다 합계 시간이 14% 늘고 비용이 80% 줄었습니다. 엔진 버전 3과 비교하면 58% 느리고 비용은 93% 적습니다. 상한 16은 시간이 상한 4와 비슷한데 비용은 2.7배였습니다. 쿼리별로는 방향이 갈렸습니다. 상한 4에서 Q4와 Q16은 2배 넘게 빨라졌고 Q14와 Q19는 2배 가까이 느려졌습니다. 그림 2에서 워커 하나로 실행된 쿼리(속이 빈 점)가 비용 비율이 낮은 쪽에 모여 있는 것과 같은 결과입니다.

두 엔진을 같은 시간에 실행한 것이 결과를 바꿨는지도 표 7의 단독 실행 행으로 확인했습니다. 엔진을 하나씩 따로 실행한 합계는 본 측정과 3% 안에서 같았습니다.

06

결과가 달랐던 쿼리와 확인하지 못한 항목

결과 행은 규모마다 22개씩 110건을 비교했고 98건이 같았습니다. 9건은 정렬 기준의 값이 같은 행끼리 순서가 달랐습니다. 3TB의 Q3과 Q18, 그리고 200GB와 500GB의 7건입니다. 200GB와 500GB는 복사본끼리 금액이 같아 정렬 기준의 값이 같은 행이 많습니다. 값이 달랐던 것은 100GB, 200GB, 500GB의 Q22입니다. Q22는 계좌 잔액이 평균보다 큰 고객을 세는 쿼리여서 두 엔진에서 평균만 따로 구해 보았습니다.

sql
select avg(c_acctbal) as avg_bal, typeof(avg(c_acctbal)) as avg_type, count(*) as customers
from customer
where c_acctbal > 0.00
  and substr(c_phone, 1, 2) in ('13', '31', '23', '29', '30', '18', '17')

-- 엔진 버전 3
['4998.77', 'decimal(15,2)', '3819172']
-- DuckDB 엔진
['4998.769056963132', 'DOUBLE', '3819172']

금액 열의 평균을 조건에 쓰는 쿼리는 엔진을 바꾸기 전에 결과를 비교해야 합니다. 엔진 버전 3은 decimal(15,2) 열의 평균을 같은 자릿수로 반올림하고 DuckDB 엔진은 DOUBLE로 돌려줍니다. 잔액이 정확히 4,998.77인 고객은 DuckDB 엔진에서만 평균보다 큰 고객이 됩니다. 100GB의 Q22도 고객 1명과 잔액 4,998.77만큼 차이 났습니다. 100GB를 복사한 200GB와 500GB에서는 복사한 횟수와 같은 2명과 5명이었습니다.

SQL 방언도 다릅니다. select 5/2는 엔진 버전 3에서 2, DuckDB 엔진에서 2.5입니다. Athena는 두 엔진 사이에서 SQL을 변환하지 않으므로 쿼리를 그대로 옮기면 오류 없이 다른 값이 나올 수 있습니다.

문서와 다르게 동작했거나 문서에 없던 점도 있었습니다.

  • 문서는 DuckDB 엔진이 다른 리전의 S3 버킷을 읽지 못한다고 안내합니다. 하지만 버지니아 북부 리전의 공개 버킷에 있는 25행짜리 텍스트 테이블은 도쿄의 DuckDB 워크그룹에서 조회됐습니다. 큰 테이블은 시도하지 않았습니다.
  • DuckDB 엔진의 DataScannedInBytes는 엔진 버전 3의 값과 같은 기준으로 비교할 수 없었습니다. 3TB의 Q3은 엔진 버전 3이 224.7GiB, DuckDB 엔진이 1.8GiB였고 Q20은 281.2GiB와 1,182.4GiB였습니다.

아래 항목은 확인하지 못했습니다.

  • 3TB는 1회만 실행했습니다. 100GB에서 같은 쿼리의 DPU 수가 실행마다 달랐고 500GB에서는 엔진 버전 3의 일부 쿼리가 실행마다 몇 배씩 달랐으므로 3TB의 쿼리별 값도 다시 실행하면 달라질 수 있습니다.
  • 200GB와 500GB는 100GB 테이블을 복사한 데이터여서 생성기로 만든 데이터에서는 결과가 다를 수 있습니다. 500GB와 3TB 사이의 크기는 측정하지 않았습니다.
  • 3TB에서는 AWS Glue 열 통계를 만든 테이블, ZSTD로 압축한 테이블, DPU 상한을 바꾼 워크그룹으로 측정하지 않았습니다. 100GB에서는 열 통계를 만들어도 두 엔진의 합계 시간이 줄지 않았습니다. 엔진 버전 3은 통계가 없을 때 99.5초, 있을 때 112.1초였고 DuckDB 엔진은 138.2초와 138.4초였습니다. 3TB의 Q17과 Q18에서 엔진 버전 3이 통계로 얼마나 빨라지는지는 확인하지 못했습니다.
  • 여러 쿼리를 동시에 실행하는 부하, 파티션 테이블, Apache Iceberg 테이블은 측정하지 않았습니다.
  • 도쿄 리전은 쿼리 하나가 받는 최대값이 60 DPU입니다. 문서에 124 DPU로 나와 있는 리전에서는 큰 규모의 결과와 합계 속도가 뒤집히는 크기가 다를 수 있습니다.
  • 비용은 API 통계로 계산한 값이고 청구서와 대조하지 않았습니다. 프리뷰 기간이어서 동작과 요금이 바뀔 수 있습니다.

07

쿼리 유형과 데이터 크기에 따른 엔진 선택

발표문의 두 수치 가운데 비용은 이 시험에서 발표보다 큰 폭으로 확인됐고 속도에는 조건이 붙었습니다. 비용은 데이터가 작아도 줄었습니다. 속도는 큰 테이블을 조인하고 다시 집계하는 쿼리가 500GB부터 빨라졌고 나머지 쿼리의 합계는 3TB에서도 엔진 버전 3이 빨랐습니다. 표 8에 이 결과를 워크로드별로 옮겼습니다.

워크로드시험 결과조건
200GB 이하의 대화형 쿼리엔진 버전 3이 빨랐습니다. DuckDB 엔진으로 옮기면 비용은 줄고 응답은 느려집니다수 초의 지연을 받아들일 수 있을 때 옮깁니다
200GB 이하의 배치 쿼리DuckDB 엔진이 저렴했고 100GB에서는 DPU 상한을 낮추면 더 저렴했습니다상한이 없으면 같은 쿼리의 비용이 실행마다 달라집니다
500GB 근처의 쿼리 묶음합계 시간은 두 엔진이 비슷했고 비용은 DuckDB 엔진이 적었습니다100GB를 복사한 데이터의 결과입니다
큰 테이블을 값의 종류가 많은 키로 조인하거나 집계하는 쿼리500GB부터 DuckDB 엔진이 빠르고 저렴했고 3TB에서 차이가 가장 컸습니다3TB는 1회 실행, 열 통계가 없는 테이블, 도쿄 리전의 DPU 최대값에서 나온 결과입니다
테이블 하나를 훑는 집계모든 규모에서 비용은 DuckDB 엔진이 적었고 속도는 엔진 버전 3이 빨랐습니다응답 시간과 비용 가운데 중요한 쪽으로 고릅니다
스캔 규모가 작고 조인이 많은 쿼리DuckDB 엔진이 더 비싼 경우가 있었습니다스캔한 1GiB당 DPU 사용량이 손익분기를 넘는지 확인합니다
ZSTD처럼 압축률이 높은 테이블두 엔진 모두 비용이 줄었고 두 엔진의 비용 차이는 좁아졌습니다지금 테이블의 압축 방식으로 엔진 버전 3의 스캔 규모를 다시 확인합니다
금액 열의 평균이나 정수 나눗셈을 쓰는 쿼리두 엔진의 결과가 달랐습니다옮기기 전에 결과 행을 비교합니다

표 8. 워크로드별 시험 결과와 조건

쿼리를 하나씩 비교할 때는 워크그룹을 새로 만들지 않아도 됩니다. 설정을 강제하지 않는 엔진 버전 3 워크그룹에서는 StartQueryExecution 요청에 EngineVersion을 넣으면 그 쿼리만 DuckDB 엔진으로 실행됩니다. 문서가 설명하는 엔진 재정의 기능입니다. 설정을 강제하는 워크그룹에서는 문서대로 요청이 거절됐습니다.

json
// StartQueryExecution 요청 본문
{ "QueryString": "select version() as v", "WorkGroup": "adb-lab-load", "EngineVersion": "DuckDB" }

// 설정을 강제하지 않는 워크그룹 adb-lab-load: GetQueryExecution 응답과 결과 행
"EngineVersion": { "EffectiveEngineVersion": "DuckDB", "SelectedEngineVersion": "DuckDB" }
[['v'], ['v2.0-cyanoptera']]

// 설정을 강제하는 워크그룹 adb-lab-v3
InvalidRequestException: EngineVersion 'DuckDB' is not supported for workgroups that enforce workgroup configuration.

운영 데이터에서는 옮길 쿼리를 두 엔진에서 실행해 시간, 비용, 결과 행을 직접 비교해야 합니다. 3TB의 속도 결과는 한 번의 실행과 열 통계가 없는 테이블에서 나온 값이기 때문입니다. 비용만 보면 스캔 규모가 큰 쿼리부터 옮길 때 절감액이 큽니다.

Billing basis: from data scanned to compute time used

On December 1, 2026, AWS announced a new query engine for Amazon Athena, the DuckDB engine, in preview. The announcement says that on large datasets queries run up to 2x faster and cost up to 50% less than on engine version 3.

Moving to the DuckDB engine changes what a query is billed for. When I compared the two engines myself, that change lowered the cost at every data size. Speed did not follow. On small data engine version 3 was faster, at a few hundred GB the two engines were level, and at terabyte scale the DuckDB engine was faster. What changed the order was a few queries that join large tables and aggregate them again. Small queries where response time matters and large queries where cost matters need separate decisions.

Engine version 3 bills a query for the amount of data it scans. So the way to lower the cost was to scan less. Tables were partitioned, stored in a columnar format such as Parquet, and compressed at a higher ratio. A query with many joins that ran for a long time cost the same as a short one when both read the same data.

The DuckDB engine bills a query for the compute time it uses. The unit is the DPU-hour. A DPU (Data Processing Unit) is a bundle of CPU and memory that processes a query, and the pricing page describes 1 DPU as typically 4 vCPU and 16 GB of memory. One DPU used for one hour is one DPU-hour. Athena decides how many DPUs each query gets, and the user only sets an upper and a lower limit in the workgroup. For the same data read, a query that computes for a long time costs more and a query that reads a lot and finishes quickly costs less.

The whole test setup. A test client sends the same 22 SQL texts to an engine version 3 workgroup and a DuckDB workgroup, and both engines read the Parquet files in Amazon S3 through the same table definitions in the AWS Glue Data Catalog
Figure 1. The whole test setup. Two workgroups query the same Parquet tables and only the billing basis differs

The numbers in the announcement come with the conditions "large datasets" and "up to", and the announcement does not say how they were measured. What remains is how large the data has to be before queries get faster, and for which queries the cost falls and for which it rises.

01

A test setup with the same tables and the same SQL

The data is the TPC-H text data that AWS keeps in a public S3 bucket. I read three scales, 10GB, 100GB and 3TB, with CTAS (CREATE TABLE AS SELECT) on engine version 3 and converted them to Parquet (SNAPPY compression) in a bucket in the Tokyo Region. The 8 tables have no partitions, and I did not create AWS Glue column statistics. After the conversion I counted the rows of every table on both engines and checked them against the row counts in the TPC-H specification.

sql
create table adb_tpch_sf100.lineitem
with (format = 'PARQUET', write_compression = 'SNAPPY',
      external_location = 's3://athena-duckdb-lab-<account-id>-apne1/tpch/sf100/lineitem/')
as select l_orderkey, l_partkey, l_suppkey, l_linenumber, l_quantity, l_extendedprice,
          l_discount, l_tax, l_returnflag, l_linestatus, l_shipdate, l_commitdate,
          l_receiptdate, l_shipinstruct, l_shipmode, l_comment
from adb_src.sf100_lineitem

The public data has no size between 100GB and 3TB. To find the size at which the speed turns, I copied the 100GB tables 2 and 5 times into 200GB and 500GB tables. For every copy I added the key range of the 100GB data to every key so that the copies share no key, so the row counts of joins and the number of groups are 2 and 5 times those at 100GB. Money and date values are the same in every copy, which differs from the data a generator would produce. After building the tables I checked the row counts, that the keys are unique and cover the expected range, and that the foreign keys have no row without a match.

sql
-- Second copy into orders at 200GB: add the key range of the 100GB data to the order key and the customer key
insert into adb_tpch_sf200.orders
select o_orderkey + 600000000 as o_orderkey, o_custkey + 15000000 as o_custkey, o_orderstatus,
       o_totalprice, o_orderdate, o_orderpriority, o_clerk, o_shippriority, o_comment
from adb_tpch_sf100.orders

I created one workgroup per engine. For the DuckDB workgroup I set only the engine name and left everything else at the default. With the defaults Athena decides the number of DPUs for each query, and results are kept in storage that Athena manages (managed query results).

bash
# Engine version 3 workgroup: results go to my bucket
aws athena create-work-group --name adb-lab-v3 --region ap-northeast-1 \
  --configuration '{"EngineVersion":{"SelectedEngineVersion":"Athena engine version 3"},
    "ResultConfiguration":{"OutputLocation":"s3://athena-duckdb-lab-<account-id>-apne1/results/v3/"},
    "EnforceWorkGroupConfiguration":true,"PublishCloudWatchMetricsEnabled":true}'

# DuckDB workgroup: only the engine is set
aws athena create-work-group --name adb-lab-duckdb --region ap-northeast-1 \
  --configuration '{"EngineVersion":{"SelectedEngineVersion":"DuckDB"}}'

The queries are the 22 queries of TPC-H with the validation parameters from the specification. I wrote date arithmetic as the computed date values so that both engines received the same SQL text. Each engine ran Q1 through Q22 one at a time in order, and the two engines ran at the same time. I ran 10GB and 100GB 5 times, and 3TB once because of the cost. Below I call this the main run. I ran 200GB and 500GB 3 times each afterwards, and I alternated 200GB with 100GB to get 100GB values from the same hour again. The numbers in this post come from data and queries derived from TPC-H and are not comparable to published TPC-H results.

I compared speed with the total execution time that GetQueryExecution returns (TotalExecutionTimeInMillis). It includes queue, planning, execution and result processing time, and Athena records it, so the location of the client has no effect. I calculated cost from the statistics in the same response, not from the bill. For engine version 3 I rounded the bytes scanned (DataScannedInBytes) up to the next MB, applied the 10 MB minimum and multiplied by 5.00 USD per TB. For the DuckDB engine I multiplied the DPU time used (DpuConsumedInMillis) by 0.35 USD per DPU-hour. Both prices are the Tokyo Region values that I got from the AWS Price List API on December 3, 2026.

json
// Engine version 3, Q5 at 10GB
"Statistics": {
  "DataScannedInBytes": 843951569,
  "EngineExecutionTimeInMillis": 2234,
  "QueryPlanningTimeInMillis": 452,
  "QueryQueueTimeInMillis": 57,
  "TotalExecutionTimeInMillis": 2370
}

// DuckDB engine, the same query
"EngineConfiguration": { "Classifications": [ { "Name": "athena-execution-properties",
  "Properties": { "max-dpu-count": "124", "min-dpu-count": "0.25" } } ] },
"Statistics": {
  "DataScannedInBytes": 6947375,
  "DpuConsumedInMillis": 51112,
  "DpuCount": 20.0,
  "EngineExecutionTimeInMillis": 3563,
  "QueryPlanningTimeInMillis": 598,
  "QueryQueueTimeInMillis": 114,
  "TotalExecutionTimeInMillis": 3807
}

Calculated from these responses, engine version 3 scanned 805 MB for 0.00384 USD and the DuckDB engine used 51.1 DPU-seconds for 0.00497 USD. DpuCount is the peak number of DPUs in use at the same time while the query ran, and DpuConsumedInMillis is the total usage.

The AWS CLI 2.42.1 that was installed did not show the DPU fields in the response. The user guide also says that the CLI and SDK versions released before December 1, 2026 do not include the new parameter and the new API. So I called the Athena API directly with SigV4 signing and saved the responses as they were. The DPU statistics were empty right after a query finished and were filled in when I asked again about 2 minutes later.

02

Speed gains limited to some queries at the large scales

In the total time of the 22 queries the two engines were about the same at 10GB, and engine version 3 was faster at 100GB and 200GB. At 500GB the two engines were level, and at 3TB the DuckDB engine was faster. Table 1 is the sum of the execution times of the 22 queries.

ScaleEngine version 3 (s)DuckDB engine (s)Speed ratioGeometric mean per queryRange per queryQueries 2x faster or moreFaster queriesSlower queries
10GB52.154.10.960.990.55~1.7401111
100GB99.5138.20.720.690.39~1.480418
200GB136.8179.00.760.710.41~1.690418
500GB266.3260.21.020.870.42~3.822715
3TB3,150.91,101.82.861.150.28~12.9261111

Table 1. Sum of the execution times of the 22 queries and the speed ratio (engine version 3 time ÷ DuckDB engine time). Median of 5 runs at 10GB and 100GB and of 3 runs at 200GB and 500GB, 1 run at 3TB

At 100GB, 18 of the 22 queries got slower and none got more than 2x faster. The query that slowed down the most was Q6, which reads only the lineitem table. It went from 1.94 seconds to 4.93 seconds.

The total at 3TB is 2.86x, but two queries made that number. Engine version 3 took 1,291 seconds for Q17 and 621 seconds for Q18, and the two queries are 61% of its total time. The DuckDB engine finished the same queries in 100 seconds and 53 seconds. Without the two queries the ratio is 1.30x, and the geometric mean per query is 1.15x.

text
$ python3 scripts/bench.py run --engine v3 --scale sf3000 --runs 1 --label main --budget 30
  run 1 q17 SUCCEEDED total=1291346ms engine=1291149ms scanned=242625219831 spent<=18.22
  run 1 q18 SUCCEEDED total=620857ms engine=620666ms scanned=149294226581 spent<=18.90

$ python3 scripts/bench.py run --engine duckdb --scale sf3000 --runs 1 --label main --budget 30
  run 1 q17 SUCCEEDED total=99911ms engine=99628ms scanned=3230208403 spent<=4.66
  run 1 q18 SUCCEEDED total=52536ms engine=52291ms scanned=149294226581 spent<=4.97

In the log, scanned is the bytes scanned and spent is the upper bound of the cost (USD) that the test script had accumulated up to that point.

Even at 3TB the DuckDB engine was slower for 11 of the 22 queries. The 6 queries that got more than 2x faster (Q3, Q5, Q13, Q17, Q18, Q21) join large tables or aggregate lineitem again in a subquery. For Q1 and Q6, which scan lineitem alone and aggregate it, engine version 3 was 1.9x and 2.0x faster.

Distribution of the speed ratio and the cost ratio of the 22 queries at each scale. At 10GB the points sit on both sides of speed ratio 1, at 100GB they gather to its left, and at 3TB they spread from speed ratio 0.28 to 12.9. At all three scales most points are below cost ratio 0.5
Figure 2. Speed ratio and cost ratio per query. The lower right is where the DuckDB engine is faster and cheaper, and the orange dotted lines are the numbers from the announcement

Figure 2 shows the three scales of the main run. The points at 10GB sit on both sides of the vertical line at 1, the points at 100GB gather to its left, and only at 3TB do they spread far to the right. Vertically, most points are below 0.5 at all three scales. Speed depended on the scale and the query, and cost fell for almost every query.

03

The total turning at 500GB and the queries behind it

The size at which the total speed turns was about 500GB. When Q5, Q17, Q18 and Q21, the queries that took the longest on engine version 3 at 3TB, are summed apart from the other 18, the two query groups move in opposite directions.

ScaleRunsSpeed ratioFour queries (Q5, Q17, Q18, Q21): engine version 3 (s)Four queries: DuckDB (s)Ratio of the fourOther 18: engine version 3 (s)Other 18: DuckDB (s)Ratio of the other 18
10GB50.9612.210.31.1839.943.70.91
100GB50.7233.831.21.0865.7107.00.61
100GB (measured again)30.6632.729.71.1057.3106.40.54
200GB30.7649.849.81.0087.0129.20.67
500GB31.02120.963.91.89145.4196.30.74
3TB12.862,474.8322.77.67676.0779.10.87

Table 2. Speed ratio at each scale, split into the four queries and the other 18. The ratio is engine version 3 time ÷ DuckDB engine time, and "100GB (measured again)" is the run that alternated with 200GB

For the four queries the two engines were level at 200GB, and the DuckDB engine was 1.89x faster at 500GB and 7.67x faster at 3TB. The sum of the other 18 was faster on engine version 3 at every scale, and the ratio was still 0.87x at 3TB. The total turned because the share of the four queries in the time of engine version 3 grew, to 34% at 100GB, 45% at 500GB and 79% at 3TB.

The 1.02x at 500GB is the sum of the per-query medians. On engine version 3 at 500GB, one or two queries, different ones in each run, took 1.7x to 5.0x their median. Compared by the sum of one pass of the 22 queries, the DuckDB engine was 1.16x to 1.22x faster in all three runs.

I looked for the reason in the stage statistics of engine version 3. Engine version 3 splits a query into stages and runs many tasks of a stage at the same time. The sum of the per-stage execution times that GetQueryRuntimeStatistics returns for one query is hundreds of times the elapsed time. I read that sum divided by the elapsed time as how widely engine version 3 spread the work. The documentation does not define the value, so this reading is my inference. The DuckDB engine returns no stage statistics, so I list its DPU usage beside it.

ScaleFour queries: summed stage time (s)Four queries: per elapsed second (s)Other 18: summed stage time (s)Other 18: per elapsed second (s)DuckDB: DPU usage (DPU-seconds)DuckDB: executions on 60 DPUs / all
10GB3,5093108,5192322540 / 110
100GB22,10767247,5157642,90121 / 110
200GB41,08984383,3661,0015,69729 / 66
500GB113,456944184,9281,30212,54551 / 66
3TB1,916,0417741,016,6741,51264,03322 / 22

Table 3. Stage time of engine version 3 and DPU usage of the DuckDB engine. The stage time is read from the execution with the median time of every query, and it is not in the same unit as DPU-seconds, so the two cannot be compared with each other. Per elapsed second is the summed stage time ÷ the elapsed time

From 10GB to 100GB the data grew 10x and the total time of engine version 3 grew only 1.9x. The stage time per elapsed second grew 2.2x for the four queries and 3.3x for the other 18, so the engine spread the work more widely. On the DuckDB engine the DPU usage grew 11.4x and the time 2.6x. Queries that mostly finished on a single worker of 1 DPU at 10GB ran on several workers at 100GB, and as chapter 05 shows, the time did not fall by as much as the workers were added. The two engines were about the same at 10GB because a query finished within 5 seconds and fixed time such as queueing and planning was more than a quarter of the total.

From 100GB on the two query groups parted. For the other 18, engine version 3 kept raising the stage time per elapsed second up to 3TB, so its time grew more slowly than the data. For the four queries that value never went above 1,000 seconds. The summed stage time of the four queries grew 87x between 100GB and 3TB while the data grew 30x. Over the same range the DPU usage of the DuckDB engine for the four queries grew 24x. All four join or group lineitem by keys with many distinct values. Q17 computes the average quantity per part and Q18 the total quantity per order, and at 3TB there are 600 million parts and 4.5 billion orders. I could not confirm why the stage time of these operations grew faster than the data on engine version 3.

On the DuckDB engine more executions got 60 DPUs as the data grew, and its total time grew only 1.5x between 200GB and 500GB. At 3TB all 22 queries ran on 60 DPUs, and a query cannot get more than that in the Tokyo Region. On larger data I expect the time of the DuckDB engine to grow in proportion to the data as well.

04

Cost below half at every scale

The cost of running the 22 queries once fell by 64% from 10GB to 200GB, by 69% at 500GB and by 74% at 3TB. That is more than the "up to 50%" in the announcement, and it held when the data was small.

ScaleEngine version 3 scanned (GiB)Engine version 3 cost (USD)DuckDB DPU-hoursDuckDB cost (USD)Cost ratioQueries per USD (engine version 3)Queries per USD (DuckDB)Queries 50% cheaper or moreDearer queries
10GB14.20.06940.0700.02470.36317.0892.1182
100GB158.80.77530.8060.28210.3628.478.0161
200GB317.71.55111.5820.55380.3614.239.7151
500GB794.33.87833.4851.21960.315.718.0191
3TB4,948.124.160617.7876.22540.260.93.5200

Table 4. Cost of running the 22 queries once and queries per USD. Calculated from the API statistics and the Tokyo Region prices, not checked against the bill. The cost ratio is DuckDB engine ÷ engine version 3

At 100GB the DuckDB engine took 39% longer but ran 2.7x as many queries for the same 1 USD. At 3TB it was faster and ran 3.9x as many queries per USD.

The break-even point between the two pricing models follows from the prices. Scanning 1 GiB on engine version 3 costs 0.0049 USD. For that amount the DuckDB engine uses 50.2 DPU-seconds. When a query uses fewer DPU-seconds than that per GiB scanned, the DuckDB engine is cheaper. The median of the queries I measured was 3.7 DPU-seconds at 10GB, and from 100GB to 3TB it was between 12.7 and 17.4 DPU-seconds.

The DuckDB engine cost more for 5 of the 110 queries. They are Q5 and Q8 at 10GB and Q16 at 100GB, 200GB and 500GB, at 1.29x to 1.75x the cost. In all of them the scan is small and Athena gave the query 12 to 40 DPUs. In the other direction, the gap is large for queries that read a lot and finish quickly. Q15 at 3TB scanned 480 GiB for 2.34 USD on engine version 3 and cost 0.20 USD on the DuckDB engine.

The cost gap between the two engines depends on how the Parquet files are compressed. Engine version 3 bills by the bytes it scans, so compressing the same data into fewer bytes lowers its charge. To check this I rewrote the 100GB tables with ZSTD and ran the 22 queries 3 times.

Compression (100GB)Parquet size (GiB)Engine version 3 scanned (GiB)Engine version 3 cost (USD)DuckDB cost (USD)Cost ratioEngine version 3 time (s)DuckDB time (s)
SNAPPY (main run)35.35158.80.77530.28210.3699.5138.2
ZSTD23.1597.50.47600.20760.44119.7131.5

Table 5. Cost and time of the 22 queries with the 100GB tables compressed with SNAPPY and with ZSTD. SNAPPY is the main run of 5 runs and ZSTD is 3 runs. The cost ratio is DuckDB engine ÷ engine version 3

The ZSTD tables were 35% smaller as Parquet, and the cost on engine version 3 fell by 39%. The cost on the DuckDB engine also fell, by 26%. Of the 22 queries, 13 got fewer DPUs than on the SNAPPY tables. Executions with 1 DPU, which never occurred at 100GB in the main run, appeared for Q2, Q11 and Q22. The user guide says that whether a query runs on one worker or on several depends on the statement, the data that the query reads and the compute that Athena chooses, and it does not say how Athena chooses the size. From these results my guess is that the size of the files to read is part of that choice.

The cost gap between the two engines narrowed from 64% to 56%. If your tables already use a compression with a high ratio such as ZSTD, moving engines saves less than Table 4 shows. The total time on engine version 3 varied by up to 13% when I measured the same SNAPPY files again. I could not tell whether the 20% longer time on the ZSTD tables came from the compression.

05

Athena's DPU assignment behind the cost

On the DuckDB engine the cost of the same query changed with the number of DPUs that Athena gave that execution. An execution that got more DPUs did not finish that much sooner. Table 6 is the distribution of the number of DPUs (DpuCount) that the queries got.

DPUs given to the query10GB (executions)100GB (executions)200GB (executions)500GB (executions)3TB (executions)
1 DPU750000
4 DPU15451230
8~28 DPU2014630
32~56 DPU0301990
60 DPU021295122
Total110110666622

Table 6. Distribution of the number of DPUs that the queries got. Workgroup with no DPU cap

At 10GB most executions ran on 1 DPU, and at 3TB all 22 queries got 60 DPUs, the largest size in the Tokyo Region. According to the documentation, a single worker uses up to 4 DPUs, and larger sizes add workers of 4 DPUs each so that several workers share the query.

At 100GB the same query got a different size from one run to the next. For 10 of the 22 queries, some of the 5 runs used a single worker and the others used several workers. Q21 took 8.38 seconds on a single worker and 9.25 seconds on 60 DPUs, at 13.9x the cost. Across the 10 queries, the executions on several workers took 0.92x to 1.55x the time of the single worker and cost 4.6x to 13.9x as much. I could not confirm the cause. The documentation says that a query can run on a single worker when additional workers are not available in time. The page on usage also says that during the preview the DPU statistics of the same query can vary.

So I ran 100GB again, 3 times each, in workgroups with the DPU cap (max-dpu-count) set to 4, 16 and 32. Below is the command that sets the cap to 4, and for 16 and 32 only the value changes.

bash
aws athena create-work-group --name adb-lab-duckdb-dpu4 --region ap-northeast-1 \
  --configuration '{"EngineVersion":{"SelectedEngineVersion":"DuckDB"},
    "EngineConfiguration":{"Classifications":[{"Name":"athena-execution-properties",
      "Properties":{"max-dpu-count":"4"}}]}}'
Condition (100GB)RunsSum of the 22 queries (s)Cost (USD)DPU-hoursLargest DPU count
Engine version 3, main run599.50.7753--
Engine version 3, alone3102.10.7753--
DuckDB, main run (no cap)5138.20.28210.80660
DuckDB, alone (no cap)3135.90.25830.73860
DuckDB, cap of 32 DPUs3140.10.21940.62732
DuckDB, cap of 16 DPUs3154.90.15320.43816
DuckDB, cap of 4 DPUs3157.30.05780.1654

Table 7. Totals of the 22 queries at 100GB with different DPU caps. Time is the sum of the per-query medians and cost is for running the 22 queries once

The lower the cap, the lower the cost, and the time did not grow by as much. With a cap of 4 the total time was 14% longer than in the main run and the cost was 80% lower. Against engine version 3 that is 58% slower and 93% cheaper. A cap of 16 took about as long as a cap of 4 and cost 2.7x as much. Per query the direction varied. With a cap of 4, Q4 and Q16 got more than 2x faster and Q14 and Q19 got almost 2x slower. This matches Figure 2, where the queries that ran on one worker (the hollow dots) gather where the cost ratio is low.

I also checked, with the rows for each engine alone in Table 7, whether running the two engines at the same time had changed the results. The totals with each engine running alone were within 3% of the main run.

06

Queries with different results and items I could not check

I compared the result rows of 110 queries, 22 at each scale, and 98 matched. In 9 the order of rows with equal sort keys differed. They are Q3 and Q18 at 3TB and 7 queries at 200GB and 500GB. At 200GB and 500GB the copies hold the same amounts, so many rows have equal sort keys. The values differed in Q22 at 100GB, 200GB and 500GB. Q22 counts the customers whose account balance is above the average, so I computed just the average on both engines.

sql
select avg(c_acctbal) as avg_bal, typeof(avg(c_acctbal)) as avg_type, count(*) as customers
from customer
where c_acctbal > 0.00
  and substr(c_phone, 1, 2) in ('13', '31', '23', '29', '30', '18', '17')

-- Engine version 3
['4998.77', 'decimal(15,2)', '3819172']
-- DuckDB engine
['4998.769056963132', 'DOUBLE', '3819172']

A query that uses the average of a money column in a condition needs its results compared before the engine is changed. Engine version 3 rounds the average of a decimal(15,2) column to the same scale, and the DuckDB engine returns a DOUBLE. A customer whose balance is exactly 4,998.77 is above the average only on the DuckDB engine. The Q22 results at 100GB also differed by 1 customer and a balance of 4,998.77. At 200GB and 500GB, which are copies of the 100GB data, the difference was 2 and 5 customers, the number of copies.

The SQL dialect differs too. select 5/2 returns 2 on engine version 3 and 2.5 on the DuckDB engine. Athena does not translate SQL between the two engines, so a query moved as it is can return a different value without an error.

Some things behaved differently from the documentation or were not in it.

  • The documentation says that the DuckDB engine cannot read S3 buckets in other Regions. But a 25-row text table in a public bucket in the N. Virginia Region could be queried from the DuckDB workgroup in Tokyo. I did not try a large table.
  • The DataScannedInBytes of the DuckDB engine could not be compared with the value from engine version 3 on the same basis. For Q3 at 3TB engine version 3 reported 224.7 GiB and the DuckDB engine 1.8 GiB, and for Q20 the values were 281.2 GiB and 1,182.4 GiB.

I could not check the items below.

  • I ran 3TB only once. At 100GB the number of DPUs of the same query changed from run to run, and at 500GB some queries on engine version 3 took several times longer in one run than in another, so the per-query values at 3TB can also change in another run.
  • The 200GB and 500GB data are copies of the 100GB tables, so data from a generator can give different results. I did not measure a size between 500GB and 3TB.
  • At 3TB I did not measure with tables that have AWS Glue column statistics, with tables compressed with ZSTD or with workgroups that have a different DPU cap. At 100GB column statistics did not shorten the total time of either engine. Engine version 3 took 99.5 seconds without them and 112.1 seconds with them, and the DuckDB engine took 138.2 seconds and 138.4 seconds. I could not check how much faster engine version 3 gets on Q17 and Q18 at 3TB with statistics.
  • I did not measure a load of several queries running at the same time, partitioned tables or Apache Iceberg tables.
  • In the Tokyo Region the largest size that a single query gets is 60 DPUs. In Regions where the documentation lists 124 DPUs, the results at the large scales and the size at which the total speed turns can be different.
  • Cost is calculated from the API statistics and not checked against the bill. This is a preview, so the behavior and the pricing can change.

07

Engine choice by query type and data size

Of the two numbers in the announcement, cost held in this test by a wider margin than announced and speed came with conditions. Cost fell even when the data was small. Speed improved from 500GB on for queries that join large tables and aggregate them again, and the sum of the other queries was faster on engine version 3 even at 3TB. Table 8 puts these results by workload.

WorkloadTest resultCondition
Interactive queries at 200GB or lessEngine version 3 was faster. Moving to the DuckDB engine lowers the cost and slows the responseMove when a delay of a few seconds is acceptable
Batch queries at 200GB or lessThe DuckDB engine was cheaper, and at 100GB cheaper still with a lower DPU capWithout a cap the cost of the same query changes from run to run
A set of queries at about 500GBThe total time was about the same on the two engines and the DuckDB engine cost lessThe result comes from data copied from the 100GB tables
Queries that join or aggregate large tables by keys with many distinct valuesThe DuckDB engine was faster and cheaper from 500GB on, and the gap was largest at 3TBThe 3TB result comes from 1 run, tables without column statistics and the largest DPU size of the Tokyo Region
Aggregations that scan a single tableAt every scale the DuckDB engine cost less and engine version 3 was fasterChoose by which matters more, response time or cost
Queries with a small scan and many joinsThe DuckDB engine cost more in some casesCheck whether the DPU usage per GiB scanned is above the break-even point
Tables with a high compression ratio such as ZSTDThe cost fell on both engines and the gap between the two engines narrowedCheck the scan size on engine version 3 again with the compression your tables use
Queries that use the average of a money column or integer divisionThe two engines returned different resultsCompare the result rows before moving

Table 8. Test results and conditions by workload

To compare one query at a time, there is no need to create a new workgroup. In an engine version 3 workgroup that does not enforce its configuration, adding EngineVersion to the StartQueryExecution request runs just that query on the DuckDB engine. This is the engine override that the documentation describes. In a workgroup that enforces its configuration, the request was rejected as documented.

json
// StartQueryExecution request body
{ "QueryString": "select version() as v", "WorkGroup": "adb-lab-load", "EngineVersion": "DuckDB" }

// adb-lab-load, a workgroup that does not enforce its configuration: GetQueryExecution response and result rows
"EngineVersion": { "EffectiveEngineVersion": "DuckDB", "SelectedEngineVersion": "DuckDB" }
[['v'], ['v2.0-cyanoptera']]

// adb-lab-v3, a workgroup that enforces its configuration
InvalidRequestException: EngineVersion 'DuckDB' is not supported for workgroups that enforce workgroup configuration.

On production data, run the queries you plan to move on both engines and compare the time, the cost and the result rows yourself. The speed result at 3TB comes from a single run on tables without column statistics. On cost alone, the savings are largest when you start with the queries that scan the most.

참고 자료References

No.출처Source종류Kind확인한 날Checked
1Amazon Athena powered by DuckDB, now available in previewWhat's NewWhat's New2026-12-03
2Use Amazon Athena, powered by DuckDB공식 문서AWS docs2026-12-03
3Query execution공식 문서AWS docs2026-12-03
4Monitor usage and control costs공식 문서AWS docs2026-12-03
5Workgroups and query controls공식 문서AWS docs2026-12-03
6Work with the AWS Glue Data Catalog공식 문서AWS docs2026-12-03
7Ways to work with DuckDB공식 문서AWS docs2026-12-03
8Override the engine for a single query공식 문서AWS docs2026-12-03
9Amazon Athena pricing요금Pricing2026-12-03
10Cloud Data Warehouse Benchmark Derived from TPC-H데이터 출처Data source2026-12-03
11TPC-H벤치마크 규격Benchmark specification2026-12-03