Re:SQLedge: Replicate Postgres to SQLite on the Edge
by linsomniac on Wednesday August 09, 2023 @08:49PM
(#37070431)
You know what's faster than a local connection to Postgres? Having the database engine directly embedded in your application. No context switch.
[ Parent
| on HN ]
Re:SQLedge: Replicate Postgres to SQLite on the Edge
by hot_gril on Thursday August 10, 2023 @12:48PM
(#37078544)
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.
Re:SQLedge: Replicate Postgres to SQLite on the Edge
by zbentley on Thursday August 10, 2023 @04:32PM
(#37081379)
There are still context switches with sqlite, even in-memory sqlite (it has to mess with files, which means syscalls). Just not network ops.
Re:SQLedge: Replicate Postgres to SQLite on the Edge
by kiitos on Thursday August 10, 2023 @05:40PM
(#37082154)
In-memory SQLite doesn't read or write files, and therefore doesn't generate syscalls, by definition.
Re:SQLedge: Replicate Postgres to SQLite on the Edge
by zbentley on Thursday August 10, 2023 @08:54PM
(#37083777)
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.