by eis · 4y ago · 0 comments
> Unique and primary key indexes are rebuilt upon startup, while user-defined indexes are discarded.
The second part with just discarding previously defined indexes is super surprising.
https://duckdb.org/docs/sql/indexes
This was an instant showstopper for me or I assume most people whose databases grow to a bigger size at which point an OLAP DB becomes interesting in the first place.
Also the numerous issues in Github regarding crashes make me hesitant.
But I really like the core idea of DuckDB being a very simple codebase with no dependencies and still providing very good performance. I guess I just would like to see more SQLite-esque stability/robustness in the future and I'll surely revisit it at some point.
This took a little while because we use a fairly modern index structure with no literature definition on how to buffer manage it.
BTW Do you have some kind of code/docs one can take a look at regarding the index structure? I'm a part-time data structure nerd :)
https://db.in.tum.de/~leis/papers/ART.pdf
There are some other papers and details about the architecture here: https://duckdb.org/why_duckdb
Typesense DB (Typesense.org) under the hood also uses ART as the base datastructure for fast full text search queries.
So I assume it would be straightforward to build an text search engine on top of duck DB and utilize ART indices to do even more lovely things.
(disclaimer - on the DuckDB team)
We actually run that benchmark as a part of our test suite now, so I am certain that there is improvement from that version.
The biggest DuckDB I've used so far was about 400 GB on a machine with ~250 GB of RAM.
There is ongoing work that we are treating as a high priority for handling larger-than-memory intermediate results within a query. But we can handle larger than RAM in many cases already - we sometimes run into issues today if you are joining 2 larger than RAM tables together (depending on the join), or if you are aggregating a larger than RAM table with really high cardinality in one of the columns you are grouping on.
Would you be open to testing out your use case and letting us know how it goes? We always appreciate more test cases!