From 66cef0c9024daf76f39e41308307a9c1859099bd Mon Sep 17 00:00:00 2001 From: Marcus Gartner Date: Fri, 6 Dec 2024 20:18:11 -0500 Subject: [PATCH] opt: add new benchmark cases that filter histogram buckets Release note: None --- pkg/sql/opt/bench/bench_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/sql/opt/bench/bench_test.go b/pkg/sql/opt/bench/bench_test.go index a5751da1245d..430c86d1eae4 100644 --- a/pkg/sql/opt/bench/bench_test.go +++ b/pkg/sql/opt/bench/bench_test.go @@ -516,6 +516,22 @@ var queries = [...]benchQuery{ query: "SELECT * FROM single_col_histogram WHERE k >= $1", args: []interface{}{"'abc'"}, }, + { + name: "single-col-histogram-bounded-range-small", + query: "SELECT * FROM single_col_histogram WHERE k >= $1 and k < $2", + args: []interface{}{ + "'abcdefghijklmnopqrstuvwxyz___________________7325'", + "'abcdefghijklmnopqrstuvwxyz___________________7350'", + }, + }, + { + name: "single-col-histogram-bounded-range-big", + query: "SELECT * FROM single_col_histogram WHERE k >= $1 and k < $2", + args: []interface{}{ + "'abcdefghijklmnopqrstuvwxyz___________________7325'", + "'abcdefghijklmnopqrstuvwxyz___________________9000'", + }, + }, { name: "json-insert", query: `INSERT INTO json_table(k, i, j) VALUES (1, 10, '{"a": "foo", "b": "bar", "c": [2, 3, "baz", true, false, null]}')`,