Favicon of duckdb

duckdb

High-performance, in-process analytical SQL database with a CLI and client libraries for Python, R, Java, and Wasm.

DuckDB is an analytical database system designed to run fast, in-process queries over structured data. It's aimed at developers and data analysts who want SQL-level analytics without standing up a separate database server, whether that's querying a CSV file on disk, running ad hoc analysis in a Python notebook, or embedding analytical SQL inside an application.

Key features

  • Rich SQL dialect: DuckDB supports arbitrary and nested correlated subqueries, window functions, collations, and complex types such as arrays, structs, and maps, plus a set of extensions aimed at making SQL friendlier to write.
  • Direct file querying: CSV and Parquet files can be queried directly by referencing the file path in a FROM clause, without a separate import step.
  • Multiple client languages: In addition to a standalone CLI application, DuckDB ships clients for Python, R, Java, and WebAssembly, among others.
  • Deep ecosystem integration: DuckDB integrates closely with data tools like pandas in Python and dplyr in R (via duckplyr), letting you run SQL against dataframes you already have in memory.
  • In-process execution: DuckDB runs inside the host application's process rather than as a separate server, which simplifies deployment for analytical workloads that don't need a dedicated database service.
  • Portable and easy to install: The project emphasizes being fast, reliable, and portable, with installation instructions covering a wide range of platforms and languages.

Ideal use cases

DuckDB fits analytical workloads where you want SQL over local or file-based data without operating a database server: exploratory data analysis in Python or R, reshaping CSV or Parquet files, or embedding analytics inside a desktop or backend application. It's also a natural fit if you're already working with pandas or dplyr and want to drop into SQL for a query that's awkward to express with dataframe operations, since it interoperates with those directly. Data engineers building a local or CI-based test pipeline for analytical SQL, without wanting to spin up Postgres just for that purpose, are another good match.

It is not designed as a transactional, multi-user database server for an application's primary datastore. DuckDB is built for analytical (OLAP) queries, not for handling many concurrent writes from separate client connections the way a server database like PostgreSQL or MySQL does. If you need a shared database that many services write to concurrently over the network, look elsewhere; if you need fast analytical queries over data that's mostly read, DuckDB is a strong fit. It also isn't meant to replace a full data warehouse for an organization with many concurrent analysts; it shines at single-machine or single-process analytical work.

Installation

DuckDB installation depends on which client you're using. The project maintains a dedicated installation page covering the CLI and every supported language client, but a typical Python setup looks like this:

pip install duckdb

Once installed, querying a file is a single statement, no import step required:

SELECT * FROM 'myfile.csv';
SELECT * FROM 'myfile.parquet';

The documentation includes a full SQL introduction and reference for exploring DuckDB's dialect beyond basic queries.

For building DuckDB from source or contributing to development, you'll need CMake, Python 3, and a C++17-compliant compiler. From the repository root:

# Build the release version
make

# Build a non-optimized debug version
make debug

# Run the unit test suites after making changes
make unit
make allunit

To check performance, build with benchmarking enabled and run the benchmark suite:

BUILD_BENCHMARK=1 BUILD_TPCH=1 make
./build/release/benchmark/benchmark_runner

Details on the available benchmarks are documented in the project's Benchmark Guide, and the full build process is covered in the official Build Guide and Contribution Guide for anyone looking to work on DuckDB itself.

For support beyond the documentation, the project maintains a dedicated support options page, and a community Discord server is linked from the README for questions and discussion. An endoflife.date page also tracks DuckDB's release and support timeline, which is useful when planning upgrades across a fleet of applications that embed it.

Categories:

Frequently asked questions

Share:

Stars
39.3K
Forks
3.4K
Last commit
2 hours ago
Repository age
8 years
License
MIT
Self-hosted
No
Activity score
85/100
View Repository
Built with:

Similar to duckdb

Favicon

 

  
  
Favicon

 

  
  
Favicon