Hello,
While investigating a performance issue, I tried to get informations from
pg_stat_statements, however I ran into another issue: it seems that when
using combined queries pg_stat_statements query normalization does not
work properly... 2 queries that should have been mapped to only one are
instead map to... 3 cases, as constants are not all ignored:
query
BEGIN ; + SELECT data FROM Stuff WHERE id = 1 ; + SELECT data FROM Stuff WHERE id = 2 ;
+SELECT data FROM Stuff WHERE id = 3 ; + COMMIT;
BEGIN ; + SELECT data FROM Stuff WHERE id = 4 ; + SELECT data FROM Stuff WHERE id = 5 ;
+SELECT data FROM Stuff WHERE id = 6 ; + COMMIT;
BEGIN ; + SELECT data FROM Stuff WHERE id = ? + SELECT data FROM Stuff WHERE id = 2
+SELECT data FROM Stuff WHERE id = 3 + COMMIT;
I was expecting the 2 combined queries either to be separated in
individual queries "SELECT data FROM Stuff WHERE id = ?" or in one large
queries with three ?, but not the above result...
--
Fabien