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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user