Aller au contenu
#0698
ExecSqlite
NEW PRIMITIVE

The query optimizer sits in the database's request path

Your product's queries reach hoody-sqlite as HTTP requests. So you register a proxy hook: every query routes through a script of yours before the database sees it. Version one is twelve lines: log each query and its timing into a metrics table. A week later you read the table: one SELECT owns sixty percent of the load, and it's scanning. Version two watches for that pattern live and creates the index itself.

On a hosted database, the request path belongs to the vendor; you tune from outside, guessing from dashboards. Here the path is yours. A script sits between every query and the engine: measuring, rewriting, indexing: and the app never learns it's there.

The database tunes itself from its own traffic.