Loading...
Loading...
Two SQLite-related stories highlight a widening gap between “plausible” database code and production-grade engineering. A practitioner’s LLM-generated Rust reimplementation of SQLite compiled, passed tests, and mirrored core subsystems, yet performed disastrously—up to ~20,000× slower—due to subtle planner/implementation mistakes (including missing INTEGER PRIMARY KEY/rowid alias handling) that triggered full-table scans. The takeaway: LLMs often optimize for believable structure, not correctness or performance, demanding strict acceptance criteria and deep verification. Meanwhile, SQLite 3.52.0 ships real-world hardening and usability upgrades, fixing a WAL-reset corruption bug and adding features like ALTER TABLE constraint changes and QRF-enhanced CLI/TCL query output.
An LLM-generated rewrite of SQLite-style functionality compiled, passed tests, and claimed full compatibility, but a simple primary-key lookup benchmark showed it was ~20,000× slower than SQLite (0.09 ms vs. 1,815 ms). The article’s author — a seasoned developer who’s been integrating LLMs into workflows — uses this case to argue that large language models optimize for plausibility, not correctness: they produce code that looks right, reads well, and can even pass tests while failing crucial performance and design expectations. The piece warns engineers to set explicit acceptance criteria and not trust apparent correctness, highlighting the risks of silent failures in LLM-assisted development.
SQLite 3.52.0, released 2026-03-06, fixes a WAL-reset database corruption bug and brings several developer- and CLI-focused improvements. Key changes include enhanced ALTER TABLE to add/remove NOT NULL and CHECK constraints, a new Query Result Formatter (QRF) used by the CLI for improved boxed Unicode output and right-justified numeric columns, and new JSON functions (json_array_insert, jsonb_array_insert). Multiple CLI usability updates, new C APIs (e.g., sqlite3_str_truncate, sqlite3_carray_bind_v2), the SQLITE_PREPARE_FROM_DDL and SQLITE_UTF8_ZT additions, and planner optimizations for set operations, joins, and DISTINCT were added. Floating-point to text conversions were reworked to default to 17 significant digits, and other vacuum/trigger/virtual-table enhancements were included. These changes matter to developers, embedded systems, and database users relying on SQLite’s stability, performance, and embedding APIs.
An engineer benchmarking LLM-generated code found a Rust rewrite of SQLite-like functionality that compiles, passes tests, and mimics file format yet performs a simple primary-key lookup ~20,000× slower than SQLite (1,815 ms vs. 0.09 ms). The author argues LLMs favor plausibility over correctness, producing convincing but inefficient or subtly incorrect systems. After six months integrating LLMs into workflows, they recommend defining clear acceptance criteria before code generation to catch silent failures and flawed logic. The report samples public projects and cites broader studies suggesting these failure modes are systemic to current LLM tooling rather than individual authors.
A practitioner tested an LLM-generated Rust reimplementation of SQLite and found it functionally plausible but catastrophically slow: a primary-key SELECT was ~20,000x slower and many operations were hundreds to thousands of times slower than system SQLite. The Rust project compiles, passes tests, and mimics SQLite’s architecture (parser, planner, VDBE, B-tree, WAL), yet two key planner/implementation bugs—most notably a missing ipk check that prevents recognizing INTEGER PRIMARY KEY columns as rowid aliases—plus other issues cause full-table scans and pathological performance. The author stresses LLMs optimize for plausibility over correctness, urging explicit acceptance criteria and rigorous verification when using generated code; external studies are cited to show this is a widespread risk.
SQLite 3.52.0, released 2026-03-06, fixes a WAL-reset database corruption bug and adds numerous developer- and user-facing features. Key changes include ALTER TABLE support for adding/removing NOT NULL and CHECK constraints, new json_array_insert() and jsonb_array_insert() functions, and the Query Result Formatter (QRF) integrated into the CLI and TCL interface for improved human-readable output. CLI improvements include enhanced .mode behavior, Unicode box drawing for interactive output, script file handling, and new .progress and .timer options. Several new C APIs and options (e.g., SQLITE_PREPARE_FROM_DDL, SQLITE_UTF8_ZT, SQLITE_LIMIT_PARSER_DEPTH, SQLITE_DBCONFIG_FP_DIGITS) were added. Query planner, join optimization, floating-point-to-text conversion (now 17-digit rounding), TEMP trigger behavior, and VACUUM INTO improvements round out the release—important for developers, DBAs, and embedded systems using SQLite.