Skip to content

Instantly share code, notes, and snippets.

@vilaca
Created May 19, 2023 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vilaca/c98166520499d539ccbd22827c7e59e9 to your computer and use it in GitHub Desktop.
Save vilaca/c98166520499d539ccbd22827c7e59e9 to your computer and use it in GitHub Desktop.

DuckDB

  • focuses on fast query execution and efficient processing of analytical queries
  • optimized for read-heavy operations and analytical queries involving large datasets
  • written in C++
  • columnar storage format, which allows for efficient data compression and query performance
  • supports SQL queries
  • has built-in support for vectorized query execution
  • supports concurrent read access
  • does not provide built-in support for concurrent write operations
  • operates primarily in memory

H2

  • written in Java
  • designed to be fast, lightweight, and feature-rich
  • supports both in-memory and disk-based database storage modes
  • full SQL support
  • ACID transactions
  • MVCC (Multiversion Concurrency Control)
  • compatibility with various database APIs
  • can run both as embedded or standalone database server.

SQLite

  • popular embedded database engine that is widely used in mobile devices annd desktop software
  • self-contained
  • serverless
  • operates directly on disk files
  • emphasizes simplicity, portability, and a small footprint
  • supports standard SQL queries, transactional and provides ACID properties
  • suitable for embedded and transactional scenarios
  • row-based storage format
  • that is well-suited for transactional operations
  • supports concurrent read and write access, making it suitable for multi-user scenarios
  • SQLite operates on disk files, allowing persistent storage
  • large user community and extensive ecosystem

What to choose

DuckDB is optimized for analytical workloads and may not perform as well for transactional workloads. It lacks some advanced features typically found in full-fledged RDBMS.

If you have demanding analytical queries and need high performance, DuckDB may be a good fit. SQLite and H2 can handle smaller workloads efficiently but may struggle with heavy analytical tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment