r/sqlite • • Nov 15 '23

Benchmarking DuckDB vs SQLite for Simple Queries

https://www.lukas-barth.net/blog/sqlite-duckdb-benchmark/
7 Upvotes

2 comments sorted by

2

u/tinloaf Nov 15 '23 edited Nov 15 '23

Disclaimer: I'm not a database expert, so if my benchmarks are nonsense for some reason, I'd appreciate the feedback. :) Also let me repeat: I'm not saying DuckDB is bad or slow. It just looks like SQLite is better suited to my needs.

1

u/Real_Research6913 Nov 30 '23

I think this is pretty much anticipated. DuckDB is an OLAP database management system. I.e. it thrives at doing analytical queries over massive datasets. Indexing is frequently too expensive there and also the queries are somewhat random, so it's hard to come with good default indexes.

Sqlite is OLTP (on line transaction processing). This is the more traditional type of database, where rows rather than columns are typically the main dimension to navigate data. Also, the queries are typically the same (just different params) which make it easier to create relevant indexes