Overview
Integrated Reasoning runs IRX, a large-scale LP/MIP solver-as-a-service application. IRX ingests high-dimensional models, computes solutions, and logs solver behavior across thousands of structured fields. We built our backend on BigQuery for its scale and performance — but as usage grew, query efficiency didn’t. We built Isofold to fix that.The Problem
Our core schema includes dense relational structures:mip_models
– uploaded model metadatamip_model_stats
– per-variable and per-constraint diagnosticssolver_sessions
– optimization jobssession_log_lines
– fine-grained solver logs
Why We Built Isofold
We needed a system that could:- Analyze SQL queries at runtime
- Apply cost-reducing rewrites safely
- Verify semantic equivalence between original and optimized queries
- Fall back automatically if verification failed
What It Did
In the first week:- Rewrite coverage: 96.4% of queries
- Average scan size reduction: 38.1%
- Verification failure rate: 0%
- Application changes: none
Example Rewrite
QUALIFY
forced BigQuery to use scan fusion logic, which reduced slot time by over 40% on large partitions.
Why It Worked
We didn’t need another query linter. We needed a system that could reason about execution cost in context, rewrite queries safely, and confirm that rewrites didn’t change semantics. Isofold did exactly that — automatically, reliably, and without slowing anything down.→ How Isofold integrates with BigQuery