nalgeon / sqlean

The ultimate set of SQLite extensions
MIT License
3.76k stars 120 forks source link

Hypertables like in timescaledb #135

Closed gedw99 closed 2 months ago

gedw99 commented 2 months ago

Hey

This is a great project . The blog is amazing too.

I was wondering it be possible to built something like hypertables with SQLite ?

Hyper tables is how timescaledb does its OLAP style workloads . It’s only on postresql.

https://docs.timescale.com/use-timescale/latest/hypertables/

tiwo commented 2 months ago

While my knowledge is limited, I don't think so - at least I think it would gain nothing, please correct me if I'm mistaken:

For context, hypertables partition tables into chunks (for example with chunk_time_interval="1 day", each chunk contains all rows from one day). These tables can then be used in the same way other PostgreSQL tables can be used, but some operations become faster and can executed in parallel for each different chunks.

Most importantly, I think that SQLite does not execute queries in parallel threads, ever (does it?).

Second, the mechanism by which loadable SQLite extension can provide a table are limited (see https://www.sqlite.org/c3ref/module.html); you can't just create a virtual table that executes JOINs faster.

nalgeon commented 2 months ago

No current plans, sorry.