Softwr

Databases · head to head

CockroachDB vs DuckDB

CockroachDB logo

CockroachDB

Databases

The cloud-native distributed SQL database

From
Free
Free plan
Yes
DuckDB logo

DuckDB

Databases

MIT-licensed analytical SQL database that runs inside your process, with no server, no dependencies and one writer at a time.

From
Free
Free plan
Yes

The short version

  • CockroachDB is a cloud-native distributed SQL database.
  • DuckDB is free; CockroachDB starts at $0.057/mo.
  • Only CockroachDB lists distributed SQL; only DuckDB lists in-process execution.
  • Where CockroachDB falls short: basic and Standard tiers limited to AWS and GCP (select regions only).

How do CockroachDB and DuckDB differ?

CockroachDB and DuckDB differ on pricing model (Freemium against Open-source), platforms and year founded (2015 against 2019). Only the attributes on which CockroachDB and DuckDB actually diverge.

Attributes where CockroachDB and DuckDB differ
AttributeCockroachDBDuckDB
Pricing modelFreemiumOpen-source
PlatformsAWS, GCP, AzureLinux, macOS, Windows, Web
Founded20152019

Identical on both: starting price (Free), free tier (Yes), category (Databases).

Which features does each one have?

They share no listed features; 20 appear only for CockroachDB and 10 only for DuckDB. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in CockroachDB

  • Distributed SQL
  • Automatic Sharding
  • Multi-region Replication
  • Geo-partitioning
  • ACID Transactions
  • Horizontal Scaling
  • Survivability
  • PostgreSQL Compatibility

Only in DuckDB

  • In-process execution
  • Vectorised columnar engine
  • Direct file querying
  • Zero dependencies
  • Larger-than-memory queries
  • MIT licence
  • Postgres-flavoured SQL
  • Extension ecosystem

What is each one used for?

CockroachDB is most often brought in for distributed SQL database for scalable applications. The jobs each tool is most often brought in to do.

CockroachDB

  • Distributed SQL database for scalable applicationsnot DuckDB
  • Multi-region deployment and failovernot DuckDB

DuckDB

  • Transformation steps in a data pipeline that would otherwise need Spark, replaced by SQL over Parquet in a single processnot CockroachDB
  • Analytical queries embedded in an application or a dashboard where shipping a database server alongside it is not acceptablenot CockroachDB
  • Local exploration of files that are too large for a pandas dataframe but far too small to justify a warehousenot CockroachDB
  • Continuous integration and testing of analytical SQL, where a real engine can run in the test process without provisioning anythingnot CockroachDB

Where do CockroachDB and DuckDB fall short?

CockroachDB's most cited limit: basic and Standard tiers limited to AWS and GCP (select regions only). Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

CockroachDB

  • Basic and Standard tiers limited to AWS and GCP (select regions only)
  • Azure support restricted to Advanced tier only
  • Basic tier limited to 50 million RUs and 10 GiB storage per month
  • Advanced tier starts at $0.60/hour for 4 vCPUs minimum
  • 3 TiB maximum storage on Basic and Standard tiers, 10 TiB per node on Advanced

DuckDB

  • A database file accepts one read-write process at a time; other processes must open it read-only and will not see subsequent writes, so DuckDB cannot be the shared database behind several services
  • There is no network protocol, authentication or user management, so exposing it to remote clients means writing and securing your own service around it
  • It is built for scans and aggregations, not for many small transactions, so a workload of high-frequency single-row inserts and updates performs badly compared with SQLite or Postgres
  • Storage files are backwards compatible but not forwards compatible, so a file written by a newer version cannot be read by an older one and every consumer of a shared file must be upgraded together
  • Query memory settings matter: some operations still need to hold significant state, so an under-configured memory limit turns a large join or a high-cardinality aggregation into a spill-heavy query or an out-of-memory failure rather than a slow success

How much do CockroachDB and DuckDB cost?

CockroachDB has a free plan, with paid plans from $0.057/mo; DuckDB is free to use. Plan by plan below, from each vendor's own pricing page.

CockroachDB

Free
  • Standard$0.057/vcpu-hour
  • Mission Critical$0.162/vcpu-hour

DuckDB

Free
  • Open source (MIT licence)Free

Which should you pick?

Choose CockroachDB if

  • You need distributed sql.
  • You want to start without paying.
  • You work on AWS, GCP, Azure.
  • You also want automatic sharding.

Choose DuckDB if

  • You need in-process execution.
  • You want to start without paying.
  • You work on Linux, macOS, Windows, Web.
  • You also want vectorised columnar engine.

Questions people ask

Is CockroachDB or DuckDB better?
It depends on the job. CockroachDB fits distributed SQL database for scalable applications; DuckDB fits transformation steps in a data pipeline that would otherwise need Spark, replaced by SQL over Parquet in a single process. CockroachDB starts at Free and DuckDB at Free.
Which is cheaper, CockroachDB or DuckDB?
CockroachDB starts at Free and DuckDB at Free.
Does CockroachDB or DuckDB run on more platforms?
CockroachDB runs on AWS, GCP, Azure. DuckDB runs on Linux, macOS, Windows, Web.
Can I use CockroachDB for free?
Both have a free tier, so you can try either at no cost before committing.
What is CockroachDB best used for?
CockroachDB is most often used for distributed sql database for scalable applications, multi-region deployment and failover. Of those, distributed sql database for scalable applications and multi-region deployment and failover are not what DuckDB is typically brought in for.
What can CockroachDB do that DuckDB cannot?
CockroachDB covers Distributed SQL, Automatic Sharding, Multi-region Replication, Geo-partitioning. DuckDB covers In-process execution, Vectorised columnar engine, Direct file querying, Zero dependencies.

Answered from the vendors’ own pages

CockroachDB: What does the free Basic tier include?

The Basic tier is free and includes 50 million RUs and 10 GiB storage per month, with a maximum compute of 30K RU/sec. No credit card is required to start.

Source
DuckDB: Can multiple applications share one DuckDB database?

Not for writing. One process holds the database read-write; others may attach read-only and will not see later writes. Shared multi-writer access needs a different database or a table format with a catalogue.

CockroachDB: How much do the paid tiers cost?

Standard tier starts at $0.18 per hour for 2 vCPUs, and Advanced tier starts at $0.60 per hour for 4 vCPUs. Both tiers support additional resources with higher costs for increased compute and storage.

Source
DuckDB: Is it a replacement for a data warehouse?

For single-node analytical workloads up to a few hundred gigabytes it very often is. It is not a replacement when many concurrent users need a shared, governed, always-on service.

CockroachDB: What are the storage limits for each tier?

Basic plan supports up to 3 TiB storage, Standard tier up to 3 TiB, and Advanced tier up to 10 TiB per node with unlimited total storage.

Source
DuckDB: Do I have to load data into it?

No. It queries Parquet, CSV, JSON and Arrow in place, including on object storage. Its own storage format is optional and mainly useful when you want indexes, constraints and faster repeated access.

CockroachDB: Can I get trial credits before paying?

Yes, new users can try CockroachDB free with $400 in credits. The Basic and Standard plans do not require a credit card to start.

Source
DuckDB: What is MotherDuck's relationship to it?

MotherDuck is a separate company offering a managed and hybrid service built on the DuckDB engine. DuckDB itself remains MIT-licensed and independent of it, with the IP held by the DuckDB Foundation.

CockroachDB: Do legacy contracts have different pricing?

Customers with annual or multi-year contracts entered before December 1, 2024 can view legacy pricing terms on a separate page, which apply until their contract renewal date.

Source
DuckDB: Is it suitable for OLTP?

No. It is designed for analytical scans. For transactional workloads with frequent small writes, SQLite or Postgres is the right tool.

Share

Related pages

Other head to heads