forked from gregs1104/pgbench-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bufsummary.sql
32 lines (28 loc) · 1.28 KB
/
bufsummary.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- Report of background write effectiveness
-- select info,testset.set,round(avg(tps)) as tps,round(10000*sum(buffers_clean) / (sum(buffers_backend)+sum(buffers_clean)))/100.0 as cleaner_pct from testset,test_bgwriter right join tests on tests.test=test_bgwriter.test where testset.set=tests.set group by testset.set,testset.info order by testset.set;
select
set,scale,clients,
round(avg(tps)) as tps,
round(avg(checkpoints_timed+checkpoints_req)) as chkpts,
round(avg(buffers_checkpoint)) as buf_check,
round(avg(buffers_clean)) as buf_clean,
round(avg(buffers_backend)) as buf_backend,
round(avg(buffers_alloc)) as buf_alloc ,
round(avg(buffers_backend_fsync)) as backend_fsync,
round(avg(max_dirty)) as max_dirty
from test_bgwriter
right join tests on tests.test=test_bgwriter.test
group by scale,set,clients
order by scale,set,clients;
--select
-- set,scale,clients,
-- round(avg(tps)) as tps,
-- round(avg(checkpoints_timed+checkpoints_req)) as chkpts,
-- round(avg(buffers_checkpoint)) as buf_check,
-- round(avg(buffers_clean)) as buf_clean,
-- round(avg(buffers_backend)) as buf_backend,
-- round(avg(buffers_alloc)) as buf_alloc
--from test_bgwriter
--right join tests on tests.test=test_bgwriter.test
--group by scale,set,clients
--order by scale,set,clients;