Appearance
Get By Primary Key
These benchmarks measure single-row retrieval (GetByPk / primary key lookup) and materialization using BenchmarkDotNet on narrow ComplexPoco.
Results - PostgreSQL
PostgreSQL 17.6 (Debian 17.6-0+deb13u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
Lower is better for Mean time and Allocated memory.
| Method | Mean | Error | StdDev | P95 | Allocated |
|---|---|---|---|---|---|
| JASE | 1.593 ms | 0.2783 ms | 1.1781 ms | 2.036 ms | 12.2 KB |
| Dapper | 1.709 ms | 0.1815 ms | 0.7684 ms | 2.239 ms | 12.76 KB |
| RepoDB | 1.765 ms | 0.1465 ms | 0.6203 ms | 2.365 ms | 17 KB |
| LinqToDB | 1.829 ms | 0.0850 ms | 0.3600 ms | 2.597 ms | 17.27 KB |
| EF | 1.918 ms | 0.2068 ms | 0.8757 ms | 2.904 ms | 24.21 KB |
How to read this
- Latency: this is a DB/network-bound single-row round trip. JASE ranked first in this run, but StdDev is large relative to the gaps — treat ranking as competitive with Dapper, not a proven percent win.
- Memory: JASE and Dapper are essentially tied; both allocate less than EF / LinqToDB / RepoDB here.
- Do not extrapolate this table to wide-row list materialization — use getListWide.md.
Results reflect one synthetic run on the hardware below. Re-run
*GetByPk*before quoting.
BenchmarkDotNet settings
- RunStrategy = Monitoring
- LaunchCount = 2
- WarmupCount = 10
- IterationCount = 100
- InvocationCount = 1
- UnrollFactor = 1