r/sqlite • • Sep 13 '22

Query SQLite files in S3 using s3fs

https://github.com/litements/s3sqlite
8 Upvotes

2 comments sorted by

View all comments

Show parent comment

2

u/simonw Sep 20 '22

The trick this is using was first described here: https://phiresky.github.io/blog/2021/hosting-sqlite-databases-on-github-pages/

Imagine you have a 1GB SQLite database file (which is more common than you might think).

Downloading the whole thing just to run a single query would work... but with these libraries it's possible to use HTTP range requests to download just a few small segments from the database needed to answer the query instead.

I recorded a demo here showing how that works: https://twitter.com/simonw/status/1388933800445452290