File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,10 @@ class WaitSampling(Plugin):
27
27
WHEN event_type = 'Lock' THEN 'hwlock'
28
28
ELSE 'buffer'
29
29
END,
30
- sum(count) AS count
30
+ sum(count * current_setting('pg_wait_sampling.profile_period')::bigint ) AS count
31
31
FROM {extension_schema}.pg_wait_sampling_profile
32
32
WHERE event_type is not null
33
+ AND queryid IS NOT NULL AND queryid != 0
33
34
GROUP BY 1
34
35
ORDER BY count DESC;
35
36
""" ,
@@ -93,9 +94,10 @@ class WaitSampling(Plugin):
93
94
"""
94
95
SELECT
95
96
event,
96
- sum(count) AS count
97
+ sum(count * current_setting('pg_wait_sampling.profile_period')::bigint ) AS count
97
98
FROM {extension_schema}.pg_wait_sampling_profile
98
99
WHERE event_type = 'Lock'
100
+ AND queryid IS NOT NULL AND queryid != 0
99
101
GROUP BY 1
100
102
ORDER BY count DESC;
101
103
""" ,
@@ -157,9 +159,10 @@ class WaitSampling(Plugin):
157
159
WHEN event = 'buffer_mapping' THEN 'buffer'
158
160
ELSE 'other'
159
161
END,
160
- sum(count) AS count
162
+ sum(count * current_setting('pg_wait_sampling.profile_period')::bigint ) AS count
161
163
FROM {extension_schema}.pg_wait_sampling_profile
162
164
WHERE event_type = 'LWLockTranche' OR event_type = 'LWLockNamed'
165
+ AND queryid IS NOT NULL AND queryid != 0
163
166
GROUP BY 1
164
167
ORDER BY count DESC;
165
168
""" ,
You can’t perform that action at this time.
0 commit comments