Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You know what's faster than a local connection to Postgres? Having the database engine directly embedded in your application. No context switch.


There are still context switches with sqlite, even in-memory sqlite (it has to mess with files, which means syscalls). Just not network ops.


In-memory SQLite doesn't read or write files, and therefore doesn't generate syscalls, by definition.


Fair enough; I didn't realize that ":memory:" SQLite accesses did zero syscalls overall, I had assumed that they required shared memory writes that entailed syscalls for barriers and the like.

I'm happy you helped me learn that's not the case! That'll make several things I regularly need to do much, much easier.


Sure! It's a huge and important benefit of that access mode.


The overhead of IPC isn't significant here, unless there's some special use case I'm not thinking of. SQLite might still be faster for small queries for other reasons.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: