All posts
Data Platform

Ad-Hoc Questions on DynamoDB vs Postgres: 16 Analytics Queries at 100,000, 1 Million and 5 Million Orders

By

November 9, 2026

9 min read

Every question across customers is a full table scan in DynamoDB: 217,000 read units at 5 million orders, whether it returns 10 rows or all of them. Postgres answered the same 16 questions in 0.08 to 2.7 seconds without a single index added for them, and an index built in 2.7 seconds took one from 148 ms to 44 ms. Measured in AWS.

Benchmark
Postgres Performance
DynamoDB
Analytics

The question that decides most database choices isn't the one you design for. It's the report someone asks for in month six. We asked 16 of them of the same data in Postgres and DynamoDB.

Count all orders769 ms5.3 sOrders by status881 ms12 sRevenue by region and month2.3 s74 sTop 10 customers, 90 days1.1 s74 sLarge refunds, 30 days584 ms5.2 sCustomers inactive 180 days78 ms77 s

Postgres

DynamoDB

Median time to answer, 5 million orders (log scale). DynamoDB: a 16-segment parallel scan, aggregated in the client. Our measurements, November 2026.

The data
PostgresDynamoDB
Count all orders769 ms5.3 s
Orders by status881 ms12 s
Revenue by region and month2.3 s74 s
Top 10 customers, 90 days1.1 s74 s
Large refunds, 30 days584 ms5.2 s
Customers inactive 180 days78 ms77 s

The full report has all 16 questions at three table sizes, the read units and cost of each scan, why a filter doesn't make a scan cheaper, what the client spent its time on, and what indexes changed in Postgres.

Reporting on data that lives in DynamoDB?

We'll look at what you need to answer and how often, and tell you whether an export, a stream or Postgres fits. 30 minutes, free.

hoolco Monthly Review

Once a month: what changed in tech that month and what it means for you, from cloud and AI to security and the tools you build with. Every item links to its source. No sales pitch, unsubscribe in one click.

As of November 9, 2026. Provided as is, for general information, and accurate to the best of our knowledge on the date shown. Not legal, compliance, tax, financial or other professional advice. Prices, limits and vendor services change; check current vendor documentation before relying on anything here. Terms of use.