3 ms·
Do you mean crafting all the various database page btree structures and entries yourself? I'd be concerned about subtle bugs.
by tyingq 5y ago
Do you mean crafting all the various database page btree structures and entries yourself? I'd be concerned about subtle bugs.
- deleted 5y ago[deleted]
- ndepoel 5y agoAn SQLite database is just a file. You can build the empty database with schema and base values ahead of time, save it to a file (or an in-memory byte buffer) and then every time you want to create a new database, you just copy that file. No need to do any expensive initialization queries that way. If raw high-speed throughput is needed, skipping that step can make a significant difference.
- deleted 5y ago[deleted]
- tyingq 5y agoYes, that approach makes sense. I thought what I was replying to was suggesting writing b-tree pages themselves, outside of sqlite, for the new data.
- emmelaich 5y agoI guess if you wanted the fastest creation you could make a custom backend format for sqlite and use that. Especially if query speed was not important.