Skip to content

Comment on SQLite performance tuning: concurrent reads, multiple GBs and 100k SELECTs/sparent

Comments

Does SQLite do direct disk I/o or something?

I’m open to being convinced otherwise, but I would expect that inserts/s would vary a bunch by filesystem.

But I do agree that local nvme with any file system is absurdly better than what you’re likely to find in typical cloud envs.

Many programs use fopen(), fread(), and fwrite() to create and manage files of data in home-grown formats. SQLite works particularly well as a replacement for these ad hoc data files. Contrary to intuition, SQLite can be faster than the filesystem for reading and writing content to disk.

https://www.sqlite.org/whentouse.html

That quotation is about a SQLite file db being a better choice than multiple ad-hoc binary files. It’s not saying whether SQLite uses direct IO.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.