Skip to content

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.

MethodMeanErrorStdDevP95Allocated
JASE1.593 ms0.2783 ms1.1781 ms2.036 ms12.2 KB
Dapper1.709 ms0.1815 ms0.7684 ms2.239 ms12.76 KB
RepoDB1.765 ms0.1465 ms0.6203 ms2.365 ms17 KB
LinqToDB1.829 ms0.0850 ms0.3600 ms2.597 ms17.27 KB
EF1.918 ms0.2068 ms0.8757 ms2.904 ms24.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

Raw Benchmark Output ​