80 pointsby rubenvanwyk2 hours ago27 comments
  • shubhamjain2 hours ago
    Despite its obvious advantages, the biggest drawback of DuckDB is its concurrency model [1]. If a process opens a database in read-write mode, it acquires an exclusive lock on the file. This prevents even simple read operations from other processes as long as the writer remains open. Maybe there's a simple workaround I haven't come across, but I found it to be quite a productivity killer.

    So yes, all these benchmarks are great, but it wasn't so fun working with DuckDB when I had to close duckdb cli, just so a query in another script could run.

    [1]: https://duckdb.org/docs/current/connect/concurrency

    • threatofrain9 minutes ago
      This is actually the biggest reason I don't automatically choose sqlite for small project databases. I've built a lot of toy utilities that crossed a bare threshold of usefulness, and then suddenly it's not a toy anymore when people start using it.

      Now it's debt. Oops.

    • coldbrewed2 hours ago
      Duckdb has a server mode[1] which might alleviate some of those pain points. SQLite is a bit more precise in that only a single connection can write to the DB which provides more concurrency but still has pain points. For a single file DB either choice seems justifiable to manage complexity.

      [1]: https://duckdb.org/2026/05/12/quack-remote-protocol

    • datadrivenangel2 hours ago
      Quack is now kind of a workaround for that limitation, as you can have a process with the lock offer read access to other processes. It's not perfect, but for that specific use case it's pretty good.
    • biophysboyan hour ago
      You can have multiple read only processes. But yes, concurrent read mode and write mode is blocked
  • brightball2 hours ago
    > DuckDB's columnar engine

    That is workload specific. Title should be "Choose DuckDB rather than SQLite for Analytics" IMHO

    • dangoodmanUTan hour ago
      This. The title might as well be “Choose a hammer rather than a wrench (when driving nails)”
    • ray_v2 hours ago
      Yes - it's a specific workload for sure. SQLite is still the GOAT when it comes to OLTP, but DuckDB is really becoming the GOAT in the OLAP world - I think DuckDB is simply amazing and truly an amazing piece of technology for anyone working with large amounts of data.
      • dataviz1000an hour ago
        > SQLite is still the GOAT when it comes to OLTP, but DuckDB is really becoming the GOAT in the OLAP world

        Can you explain this more, especially why SQLite is best at OLTP and what happens at scale?

        • storywatchan hour ago
          Most people forget that clickhouse embedded exists
          • iw2rmb15 minutes ago
            Let's keep discussion bar high.

            I've just checked their website, and they state "relying on ClickHouse to power these analytics use cases". That's not OLTP. https://clickhouse.com/comparison/postgresql

            Fair to say, seeing 1000x w/o any trace of proof won't help me to choose.

    • adsharmaan hour ago
      DuckDB also implements MVCC. In DuckLake, the DB is used for absorbing small writes and compacting them before sending to object storage.

      It has some characteristics typical of OLTP engines. But they are targeted and limited to areas DuckDB feels are important.

    • cognitiveinlinean hour ago
      Yeah, someone who has more tokens than simple sense.
  • ethin2 hours ago
    How are these two DB engines even comparable other than at the edges? They handle two completely separate workload types: one is more a general-purpose DB engine and the other is specifically for columnar datasets, analytics and the like -- of course a hand-tuned DB engine is going to destroy SQLite on any reasonable benchmark: SQLite wouldn't be optimized for that hand-tuned use-case whereas something like DuckDB is.
    • coldbrewed2 hours ago
      SQLite is _the_ tool of choice for local SQL databases with minimal overhead. If you needed a single file DB for an OLAP workload, SQLite was still the best option even if the technology wasn't an ideal fit. Duckdb is exciting specifically because SQLite/duckdb aren't comparable; we can stop shoehorning OLAP into an OLTP database.

      I ran into this myself; I tried using SQLite to store the results of whole-internet rDNS scan and a count() over the entire DB could take 8 minutes. I used the wrong DB for the job and the narrative around SQLite/duckdb is around reckoning with perfectly reasonable limitations and tradeoffs that SQLite made.

    • datadrivenangelan hour ago
      With indexes SQLite is very very fast even for aggregation at medium scales.

      And DuckDB is reasonably fast for even single record writes. ~1000x slower than SQLite, but that's still pretty fast if you're only doing a few hundred writes per second or batching.

  • tptacek2 hours ago
    Title, which is already synthetic, should be "Choose DuckDB rather than SQLite for Analytics Workloads".
  • k3liutZuan hour ago
    I couldn't read the article as it read like AI.

    And I am fatigued by the AI style in all code comments, reviews, PRs etc :(

  • oathvz2 hours ago
    This is a bait and switch article. Compare apples and oranges, "oh btw look at our product".
  • adsharmaan hour ago
    SQLite can be replicated. rqlite, dqlite, litestream etc

    DuckDB can't be. PR was sent a year ago. Blocked on the same concurrency model issue in the other sub thread.

    Specifically on windows, the database can't read its own WAL file from a different thread in the same process.

    Love DuckDB for being permissively open source, great tech and performance!

  • lanstinan hour ago
    DuckDB is modern but written in C++ and crashes in production more than SQLite, which is old and it doesn’t really crash. you have to build in resilience to use DuckDb.
  • biophysboyan hour ago
    As many others have said here, you should just think about transactional vs analytical as well as single user in-process vs multi-user client-server when making choices.

    That said, I do think duckdb has a wider range of use cases than people here might think. It can whip through fairly large datasets (I use it for ~1B row tables all the time)

  • crustycoderan hour ago
    Heartening to see so many "This is an apple, that is an orange" comments. Spot on folks!
  • egeozcan2 hours ago
    TL;DR: SQLite was doing OLAP work it was never built for (and it was okay at it, I must add), and the perf. ceiling moves two orders of magnitude when you use something that's more fit for the purpose (DuckDB in this case).

    TLDRTL;DR: If everything you do is column-store territory, use a column-store.

  • raro11an hour ago
    > $16.49/month server [...] hetzner CCX13

    That server is now $51.09 for those wondering See https://news.ycombinator.com/item?id=48540844

  • pixelesque2 hours ago
    Even for row-based data?
  • 2 hours ago
    undefined
  • an hour ago
    undefined
  • 2 hours ago
    undefined
  • cynicalsecurity2 hours ago
    Great job on comparing apples to oranges. DuckDB is a columnar OLAP engine, SQLite is row-oriented OLTP. DuckDB should stomp SQLite in that particular use case.
  • d1lan hour ago
    The AI slop is tiring man wtf. It’s so fucking lazy. The benchmark is comparing apples to oranges and doesn’t seem to be aware of it, and the way it’s written just reeks of LLM.
  • otterley2 hours ago
    AI slop. The content might be valuable but the framing makes it too painful to read.

    Please, folks, write with your own voice -- especially if it's for your business blog. It's good for you as an author (practice makes perfect) and it's good for your readers (whom you want to influence).

    • headz2 hours ago
      Agreed. It felt like I was reading a chat with Claude Code.
      • jaredezzan hour ago
        Yeah I couldn't make it past the cliff title
  • esafakan hour ago
    How about writing with sqlite and querying with duckdb-sqlite, using a replica or WAL, to avoid locks?
  • datadrivenangelan hour ago
    This is AI slop, but I really want to know more about their write patterns and how they were doing batches.
  • 2 hours ago
    undefined
  • clumsysmurf2 hours ago
    Too bad Android doesn't have JDBC APIs. Getting the native binaries compiled on Android is the easy part, but there is no straightforward way to access it from Java. The Room APIs are tied to SQLite as well.
  • sharpvik2 hours ago
    great research there
  • cronping2 hours ago
    [flagged]
  • bbqbbqbbq2 hours ago
    [dead]
  • knuckleheads2 hours ago
    I ran this through an AI checker and it flagged half of it immediately. @dang, I know Substack just enabled Pangram integration, is there anyway you could get Y Combinator to spring for a Pangram subscription for the front page or something ?
    • nickpeterson2 hours ago
      Do you think venture capital firms are made of money?
      • ethin2 hours ago
        Yes? They certainly act like they are...
      • spooneybarger2 hours ago
        well played sir. well played.
    • tptacek2 hours ago
      AI comments aren't allowed on HN. AI submissions are.
      • knuckleheadsan hour ago
        Yes, I am asking if that particular policy could be changed. A little AI here and there is fine, to each their own, but I would prefer not to read posts that are overwhelmingly so.
      • MrBuddyCasino2 hours ago
        It would still be nice to mark them.