s3sqlite

Dev tools

sqlite virtual file system

SHOW HN2022

160points
61comments
#377of 2,570 in 2022
Top 15%of 2022 by points

How HN took it

CuriousMostly questions and neutral comments

4 positive, 14 neutral or asking, 0 mixed, 2 critical, out of 20 comments about the project. Thread score +0.10.

Idea: 3 for, 2 againstDesign: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Neat trick that fetches only needed pages via HTTP range requests

    From 2 comments
    • This is really neat. It looks like it's using a similar trick to https://phiresky.github.io/blog/2021/hosting-sqlite-databases-on-github-pages/ from last year - querying SQLite…
      simonw on HN
    • This is cool. It would be interesting to see some stats like how many separate requests are needed for a single SELECT statement, since S3 charges per GET, even on a small range,…
      ks2048 on HN
  • Useful for distributing read-only SQLite data

    From 2 comments
    • This is cool, I'll probably end up using this (we store sqlite snapshots in S3). It'd be very handy if this was packaged as a CLI that worked like `sqlite3`, so you could get a…
      gkaemmer on HN
    • This would be quite convenient when dealing with MBtiles files hosted on S3 or similar. There are efforts such as PMTiles[1] that let us use HTTP Range query to retrieve tiles…
      sntran on HN

Objections

  • Using S3 for a database is risky and pushes SQLite beyond its limits

    From 2 comments
    • I feel like people are pushing SQLite beyond its limits with this stuff. If you're going to do something like this, wouldn't just a normal client/server option like PostgreSQL be…
      svnpenn on HN
    • I admire people for their inventiveness, however surely attempting to square-peg-round-hole something like this into AWS S3 is only going to end up biting them in the backside ?…
      traceroute66 on HN
  • Repeated queries may be cheaper with a local download

    From 1 comment
    • If I need to query the db repeatedly (N times per second), isn't it more efficient (low latency and aws cost) to just download the db and run queries locally?
      wanghq on HN

Requests

  • Add a CLI like sqlite3 for querying S3 files directly

    From 1 comment
    • This is cool, I'll probably end up using this (we store sqlite snapshots in S3). It'd be very handy if this was packaged as a CLI that worked like `sqlite3`, so you could get a…
      gkaemmer on HN
  • Benchmarks comparing caching and performance against other VFS implementations

    From 2 comments
    • There have been many of these custom vfs implementations. Is there a benchmark on performance between them?
      endisneigh on HN
    • This is cool. It would be interesting to see some stats like how many separate requests are needed for a single SELECT statement, since S3 charges per GET, even on a small range,…
      ks2048 on HN
  • Support for multiple ranges in a single S3 request

    From 1 comment
    • i wish s3 supported multiple ranges in the range header. I've done this sort of access with a custom columnar format that stored a set of columns in a single file it was a…
      chrsig on HN

Questions

  • Does it work with MinIO or other S3-compatible storage

    From 2 comments
  • Does caching break consistency with concurrent writes

    From 2 comments
    • Do you have any insight into whether the cache will alter consistency in the face of concurrent writes from multiple locations in a way that SQLite can't handle? I imagine this…
      vlovich123 on HN
    • This VFS is only for reading databases stored in S3, not writing. The README gives some alternatives for other implementations which allow writing.
      polyrand on HN

Alternatives named

  • sqlite-s3vfs

    From 2 comments
    • Is there a benefit over the existing S3 VFS sqlite3-s3vfs,which also uses APSW?
      remram on HN
    • Author here! I would say the main advantage is that this just needs uploading a single file to S3. `sqlite-s3vfs` will split the database in pages and upload the pages separately…
      polyrand on HN
  • S3 Select

    From 2 comments
    • This is nice, but before you go to the trouble of using it, consider just putting your CSV, JSON, or parquet data file in S3 and query it with S3 Select…
      civilized on HN
    • A comparison to S3 Select would make sense since S3 Select lets you leverage RANGE, leverage compact formats like compressed Parquet, and would presumably have a similar…
      staticassertion on HN
  • Litestream

    From 2 comments
    • Nifty, reminds me of https://github.com/backtrace-labs/verneuil or possibly https://litestream.io/
      aleph- on HN
    • I read of someone using AWS EFS for sqlite, which has nfs functionality, if I recall correctly. However I like the idea of using a local store with litestream to S3 and updating…
      JaggerFoo on HN
  • sqlite-s3-query and mbtiles-s3-server

    From 1 comment
    • Aha! This is done in https://github.com/uktrade/mbtiles-s3-server, but using an alternative library to query SQLite on S3, https://github.com/michalc/sqlite-s3-query (Full…
      michalc on HN
  • Athena

    From 1 comment
    • > attempting to square-peg-round-hole something like this into AWS S3 I don't think it's like that. AWS already offers services like S3 Select[0] or Athena[1] that do something…
      polyrand on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/32828799)