Atomic Object, a US software consultancy, built a canvassing app for a political campaign on Turso, a hosted version of the SQLite database. One UPDATE statement took 126 seconds. SQLite allows one write at a time, so every other write waited behind it. The query planner, the database component that picks how to run a query, started from the large contacts table instead of a roster of a few hundred people. Changing JOIN to CROSS JOIN forced the right order, and the developer says the update fell below 0.1 seconds.
The root cause was missing statistics: nobody had run ANALYZE, so the planner assumed every table held about a million rows. Alternatives fell short. Rewriting the statement would only have roughly halved the time, Turso rejected sampled ANALYZE, and analyzing only the large tables made plans worse. The team now runs ANALYZE nightly, audits query plans in CI (its automated test pipeline), and keeps the CROSS JOINs as a safeguard.
