How Isofold Works
Isofold is a drop-in SQL proxy that optimizes queries before they reach your data warehouse. It’s designed to be transparent, verifiable, and performant. At a high level:Core Components
1. Proxy Layer
The proxy receives SQL queries over HTTP, JDBC, or native Postgres wire protocol. It handles:- Protocol translation (if needed)
- Authentication passthrough
- Routing to the appropriate backend engine
2. Rewrite Engine
The rewrite engine is responsible for transforming SQL into semantically equivalent forms that are cheaper to execute. It performs optimizations such as:- Projection pruning
- Join simplification
- Subquery flattening
- Predicate pushdown
3. Cost Model
For supported warehouses like BigQuery, Isofold runs a dry-run of both the original and optimized queries to compare estimated costs.4. Verification Engine (Optional)
When enabled, Isofold will:- Execute both the original and rewritten queries
- Compare result sets for equality
- Log any divergence or mismatch for audit purposes
Example Rewrite
Original query:Deployment Options
Isofold can be:- Used as a hosted service with team-specific proxy URLs
- Deployed inside your cloud/VPC
- Run at the edge via Fly.io
Next: Dive deeper into the Rewrite Engine.