Certified query replacement. Same rows, same values, same errors.

Certified query replacement

Faster database queries. Identical results, proved.

For a query your application runs at high volume, we replace the engine's row-by-row work with compiled code written for that query's plan on your schema. A computer-checked proof shows it computes exactly what your engine computed.

Tell us about your queries

What we replace

The optimiser still picks the plan. We specialise the execution of that plan: code built for this one statement, not a hint the optimiser may ignore. With the code comes a proof that the replacement returns the same rows, the same values and the same errors, and a check that the code we proved is the object you deploy. Its contents are identified by digest. If the two differ, it does not run.

Which queries pay

A strong fit

  • A fixed, simple plan run millions of times, such as a scan with a range filter on one table. The plan is settled before the first row is read.
  • Small, uniform work per row, where the cost is dispatch and decoding rather than the volume of data.
  • A long-lived prepared statement, so the specialisation is paid for once and spread over its whole life.
  • Workloads where equivalence must be demonstrated, not asserted. You receive a proof with an explicit list of assumptions, not a test report.

Not a fit

  • Plans whose shape changes between runs
  • Scans where reading the data dominates the per-row work
  • One-off analytical queries
  • Anything a general optimiser rewrite already captures

What we have measured

One machine, one query shape: SELECT x FROM t WHERE x >= ?1, 100,000 rows, answered in 3.7 to 4.2 ms. Every variant was measured side by side in the same run, relative to that build's own baseline.

Relative speed of query replacement variants on one range-filter plan
Variant Relative speed
Engine as shipped 1.00×
Specialised region, AI hand-written 1.35×
Plus the specified consuming boundary 1.81 to 1.82×
Plus storage-layer changes 1.95 to 1.96×
Widened variant, on a two-column plan 1.77 to 1.82×
  • These ratios are for this query shape, this build and this machine. Per-row dispatch and decoding is what we expect to generalise. The exact ratios are not a promise for another workload.
  • 1.95× includes storage-layer edits. The variant under certification specialises the query, the row read and row construction.
  • The speed-up is quoted against the same build's baseline in the same session, because absolute times move between sessions.

What the certificate covers

The specialised region

The part that replaces the engine's per-row decoding for the reference plan, together with its interface to the surrounding statement.

Assumptions, written down

The proof is conditional on a short list, for example the byte-level behaviour of the platform's memory operations. Each one records how it is established and how it could become invalid.

No overstated certificate

A conditional certificate is not presented as an unconditional one. That list is part of what you receive.

What you provide, what you get

You provide the queries, the schema and a measurable workload. You receive the specialised code, the certification, the measurement report with its controls, and the check that binds the certified code to the deployed object.

Tell us about your queries

Send the statement, the schema and how often it runs. We will tell you whether this replacement is a fit.

Send us a message