Home Expressions
Docs
Drivers Gateway SDKs Benchmarks
Changelog
GitHub
Blog Status Roadmap
← Back to benchmark index
Transport report December 27, 2025

Go IPC Prepared-Pipeline Report

December 27, 2025 local workload for direct pgx and the qail-daemon transport path.

0.99x

daemon-path throughput relative to pgx in this run

237,561
qail IPC q/s
prepared pipeline path
239,794
pgx q/s
SendBatch baseline
355,000
Rust q/s
workspace baseline

Architecture comparison

pgx (pure Go)

Go app
  -> pgx driver
  -> PostgreSQL

Direct client-to-PostgreSQL path.

qail-daemon transport

Go app
  -> Unix socket + JSON
  -> qail-daemon (Rust/Tokio)
  -> PostgreSQL

Extra hop with prepared statement caching in the daemon.

50 Million Query Throughput

DriverQueries/sTotal timePer query
pgx (SendBatch)239,794208.5s4,170ns
qail IPC (PreparedPipeline)237,561210.5s4,210ns
Rust baseline355,000141s2,817ns

Test Configuration

ParameterValue
Total queries50,000,000
Batch size10,000 queries
Query typeSELECT id, name FROM harbors LIMIT $1
ProtocolPrepared statement plus pipeline mode
ConnectionSingle connection, no pooling

Transport Iterations

ModeQueries/sRelative to pgxNotes
qail CGO (original)126,0000.53xCGO overhead and Go-side I/O
qail IPC (PipelineFast)42,0000.18xFull Query struct encoded per batch
qail IPC (PreparedPipeline)237,5610.99xPrepared statement cache in daemon

PreparedPipeline notes

The daemon caches the prepared statement after a single Prepare call. Subsequent PreparedPipeline calls send parameter values rather than the full SQL template, which removes most of the JSON overhead for repeated execution.

PreparedPipeline flow

Go client
1. Prepare("SELECT ... LIMIT $1") -> handle
2. PreparedPipeline(handle, [["5"], ["3"], ["1"], ...])

qail-daemon
- Look up cached prepared statement by handle
- Call pipeline_execute_prepared_count()
- Return count

Potential Optimizations

These items were not tuned in the recorded run.

OptimizationEstimated gainStatus
MessagePack instead of JSON+10-15%Planned
Pre-encoded params in Go+5-10%Planned
Connection pooling in daemon+5%Planned
Projected upper bound260K+ q/sProjected only

Interpretation

  • This snapshot isolates the cost of the Go-to-daemon transport boundary on a prepared, pipelined workload.
  • The daemon path stayed close to direct pgx while preserving a shared Rust execution layer across language bindings.
  • Use this report for transport-shape reasoning, not as a replacement for direct workload validation.
  • Rerun on your own server topology before treating the ratio as production guidance.