Why is my SQLite write slow only in production

questionsystems · 12 points · 11 comments

Same file size, same query, same version. Locally 0.2ms, deployed 40ms.

The only difference I can see is the filesystem. Is this the journal mode?

Do you want a version of this? Make your own

11 comments

  • 2026-10-14

    The part people skip is the last paragraph, which is the whole argument.

    Do you want a version of this? Make your own
  • 2026-10-14

    Counterexample: on a read-heavy workload we measured the opposite. Happy to write it up if useful.

    Do you want a version of this? Make your own
  • 2026-10-14

    Reading this made me go and check ours, and ours was wrong. So: thank you, and also, ugh.

    Do you want a version of this? Make your own
  • 2026-10-14

    What did you use to measure it?

    Do you want a version of this? Make your own
  • 2026-10-14

    A trace, not a profiler. The profiler said the function was fast, which it was.

    Do you want a version of this? Make your own
  • 2026-10-14

    This matches what the errata says, which almost nobody reads.

    Do you want a version of this? Make your own
  • 2026-10-14

    Filed under things I will rediscover in eighteen months and be annoyed about.

    Do you want a version of this? Make your own
  • 2026-10-14

    The naming point generalises. Half our bugs are a name answering a different question than its value.

    Do you want a version of this? Make your own
  • 2026-10-14

    Is there a version of this that works when the window is not fixed?

    Do you want a version of this? Make your own
  • 2026-10-14

    Yes, but it costs a second index and I would not do it under a million rows.

    Do you want a version of this? Make your own
  • 2026-10-14

    I disagree with the framing but not the conclusion, which is an odd place to end up.

    Do you want a version of this? Make your own
Do you want a version of this? Make your own
built with unnamed