mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Tune SQLite build for redbean (#97)
redbean lua handlers that perform sql queries can do 400k qps. We now use a separate compile-time options for SQLite, when building the SQLite shell versus building the production web serving code. It doesn't seem appropriate for something like redbean to include backups, progress callbacks, query completion, profiling, EXPLAIN, ALTER, ANALYZE, VACUUM, etc. since those tasks are better left to the sqlite3.com shell program. Lua SQLite pointer APIs have been removed since we're not using threads. The Lua APIs for installing update / commit / rollback hooks are removed due to a general sense of disagreement and an overall lack of comfort. Full-Text Search and R*Tree are as large as the rest of SQLite combined. Turning those off keeps redbean under 1mb when built for MODE=tiny which is nice for marketing purposes. If you need something that was removed, file an issue, and we'll add it.
This commit is contained in:
parent
eb08b9fbeb
commit
88806b79b1
9 changed files with 230 additions and 1284 deletions
4
tool/net/demo/sql.lua
Normal file
4
tool/net/demo/sql.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
-- See .init.lua for CREATE TABLE setup.
|
||||
for row in db:nrows("SELECT * FROM test") do
|
||||
Write(row.id.." "..row.content.."<br>")
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue