golang-db-sql-benchmark
A collection of benchmarks for popular Go database/SQL utilities
Libraries under test
database/sql SQL Execution Benchmarks:
BenchmarkPreparedStatementsNone - Runs simple queries without query arguments, so database/sql doesn't need to create a prepared statement
BenchmarkPreparedStatementsThrowaway - Runs queries with query arguments. database/sql must create and then throwaway a prepared statement each time
BenchmarkPreparedStatementsSingle - Runs queries with query arguments, but creates and reuses the a single prepared statement
Dbr/Sqlx/Gorp SQL Execution Benchmarks:
Each library under test has the same set of benchmarks, just replace Dbr in the examples with Sqlx or Gorp. Each one is run with varying number of rows, N.
BenchmarkDbrSelectIntsN - Select rows of integers into []int64's
BenchmarkDbrSelectAllN - Select rows into s