7 ms·
FYI, in sqlite is still on disk.
by notacoward 9y ago
FYI, in sqlite is still on disk.
- elchief 9y agoIt doesn't have to be. There's an in-memory option
- Myrth 9y agoI wonder if ram fs would perform exact the same as sqlite in memory.
- DaiPlusPlus 9y agoThe article speculates that the overhead of calling `fopen` for each file and subsequently reading it is more expensive than reading from an already opened database file. But as for how expensive `fopen` is really depends many factors.
- kccqzy 9y agoI would believe ramfs would be slower, as there will be additional system calls needed.
- notacoward 9y agoFilesystems can be built in memory (ramdisks) too, but comparing sqlite in memory to files on disk would be pretty silly. For any serious and fair comparison, in sqlite still means on disk.
- Chris2048 9y agoDo you mean "stored on a traditional file-system"?
- microcolonel 9y agoFor what it's worth, I think Mapbox's vector tiles can be stored in around 48GiB of RAM, which is perfectly within reason for a server. It's also the sort of data which is simple to shard. They can have multiple geolocated databases for a local area, and maybe fewer for international queries. This can be done pretty simply at the load balancer level.