2
0

Compare binary and text format through pgx

Make ID field bigger -- otherwise all ints are less than 4 digits and
get a bit too much of an advantage in text vs. binary
This commit is contained in:
Jack Christensen
2020-05-07 22:06:07 -05:00
parent e439372d2a
commit dea915e605
2 changed files with 37 additions and 20 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func BenchmarkSelectRowsScanNull(b *testing.B) {
b.Run(fmt.Sprintf("%d rows", rowCount), func(b *testing.B) {
br := &BenchRowSimple{}
for i := 0; i < b.N; i++ {
rows, err := db.Query("select n, 'Adam', 'Smith ' || n, 'male', '1952-06-16'::date, 258, 72, now() from generate_series(1, $1) n", rowCount)
rows, err := db.Query("select n, 'Adam', 'Smith ' || n, 'male', '1952-06-16'::date, 258, 72, now() from generate_series(100000, 100000 + $1) n", rowCount)
if err != nil {
b.Fatal(err)
}