mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Remove the query_id_squash_values GUC
Commit 62d712ecfd
introduced the capability to calculate the same
queryId for queries with different lengths of constants in a list for an
IN clause. This behavior was originally enabled with a GUC
query_id_squash_values. After a discussion about the value of such a
GUC, it was decided to back out of the use of a GUC and make the
squashing behavior the only available option.
Author: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/Z-LZyygkkNyA8-kR@msg.df7cb.de
Discussion: https://postgr.es/m/CA+q6zcVTK-3C-8NWV1oY2NZrvtnMCDqnyYYyk1T7WMUG65MeOQ@mail.gmail.com
This commit is contained in:
@ -7,16 +7,7 @@ CREATE TABLE test_squash (id int, data int);
|
||||
|
||||
-- IN queries
|
||||
|
||||
-- No squashing is performed, as a baseline result
|
||||
SELECT pg_stat_statements_reset() IS NOT NULL AS t;
|
||||
SELECT * FROM test_squash WHERE id IN (1, 2, 3, 4, 5, 6, 7, 8, 9);
|
||||
SELECT * FROM test_squash WHERE id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
|
||||
SELECT * FROM test_squash WHERE id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
|
||||
SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C";
|
||||
|
||||
-- Normal scenario, too many simple constants for an IN query
|
||||
SET query_id_squash_values = on;
|
||||
|
||||
SELECT pg_stat_statements_reset() IS NOT NULL AS t;
|
||||
SELECT * FROM test_squash WHERE id IN (1);
|
||||
SELECT * FROM test_squash WHERE id IN (1, 2, 3);
|
||||
@ -177,4 +168,3 @@ SELECT pg_stat_statements_reset() IS NOT NULL AS t;
|
||||
SELECT ARRAY[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C";
|
||||
|
||||
RESET query_id_squash_values;
|
||||
|
Reference in New Issue
Block a user