3 ms·
Yeah, I have a project with about this much data, and literally read the whole file into memory, and rewrite the whole file on disk every time I need to modify
by pornel 4y ago
Yeah, I have a project with about this much data, and literally read the whole file into memory, and rewrite the whole file on disk every time I need to modify it. It's hilarious that it works.
- solardev 4y agoWait, is that just how SQlite works? It can't update an entry on disk, it just has to rewrite the whole file...?
- arein3 4y agoIt writes in a file, but only the part needed, not the whole file (like any other DB with persistence)
- adzm 4y agoIt can also use a WAL log file and periodically checkpoint to the actual db
- tinco 4y agoNo, they're saying they've implemented something that's even more simple than an embedded database and it still works fine for them. If you can stand several 100s of milliseconds of latency on every write then writing a 1.2gb flat file is not a problem.
- iforgotpassword 4y agoAt that point, why not just mmap the whole file?
- elteto 4y agoProbably because file truncation/expansion with mmap is tricky.