Researchers have a fix for why AI struggles to query real enterprise databases: the schemas are a mess, and nobody was cleaning them up first.
A team published DBCC (Database Context Compression), open-source middleware that preprocesses database schemas before passing them to a language model. Instead of feeding a model raw documentation and table definitions — which in one real benchmark swelled to 2.6 million tokens — DBCC compresses that context down to as few as 34,700 tokens by extracting repeated columns, templating similar tables, and stripping irrelevant documentation. The system works offline for structural changes and adds a lightweight online pass to pull in query-specific evidence. It plugs into existing text-to-SQL pipelines without requiring changes to the underlying model.
Enterprise databases are nothing like the tidy academic datasets that benchmarks like Spider have long used to judge AI SQL generation. DBCC's results on Spider 2.0 and BIRD — harder, messier, real-world tests — suggest the field has been solving the wrong problem: squeezing more reasoning out of models when the real issue was handing them incoherent input. Schema-linking recall jumping from 0% to 56.5% under DeepSeek-V3.2 makes "better prompting" look like a workaround.
The code is public, the gains on execution accuracy are real but modest (1.8-1.9 percentage points across three tested systems), and aggressive compression might create its own blind spots — but as a diagnosis of what breaks enterprise text-to-SQL, the argument is hard to dismiss.