Live data from Hacker News

An unscientific benchmark of SQLite vs. the file system (btrfs)

github.com

11–20 of 68 posts

Re: An unscientific benchmark of SQLite vs. the file system (btrfs)

#11

If you're using the same file, it would make sense if the db 'warms up' by growing enough to comfortably hold all your data.

Good point. That’s the more probable explanation, actually. I’d imagine the execution plan would be cached within the first batch of requests. I hadn’t considered the file resizing, but it’s a good hunch.

Re: An unscientific benchmark of SQLite vs. the file system (btrfs)

#15

For SQLite in this test writes in particular means transactions, where each transaction contains exactly one write.

Yeah. It’s simulating the behavior of a CRUD server I’m thinking about writing. I wouldn’t be able to batch writes very easily there, so it would be a transaction per write.

Re: An unscientific benchmark of SQLite vs. the file system (btrfs)

#19

The article doesn’t mention whether SQLite WAL mode is on. That could make SQLite significantly faster: https://sqlite.org/wal.html

It mentions it at the end: ./tmp.db?_timeout=5000&_journal=WAL&_sync=1

Not sure if it was updated after your comment.

Post reply on HN