Skip to content

Commit bae3980

Browse files
committed
➕ delete benchmark results
1 parent 7a6d53e commit bae3980

File tree

4 files changed

+55
-3
lines changed

4 files changed

+55
-3
lines changed

_perf tests/[2023-11-27] delete by PK vs partition drop [19c]/01.2 run the test.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ truncate table t_session_events drop storage;
77
----------------------------------------------------------------------------------------------------
88

99
declare
10-
c_run_id_list constant sys.ora_mining_number_nt := sys.ora_mining_number_nt(/*10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33,*/ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49);
10+
c_run_id_list constant sys.ora_mining_number_nt := sys.ora_mining_number_nt(10, 11, 12, 13, 20, 21, 22, 23, 30, 31, 32, 33, 40, 41, 42, 43, 44);
1111
l_run_ix pls_integer;
1212

1313
c_show_xplan constant boolean := false;
@@ -109,11 +109,11 @@ declare
109109
) loop
110110
if cv.partition_position = 1 then
111111
execute immediate 'alter table t_index_test truncate partition "'||sys.dbms_assert.simple_sql_name(cv.partition_name)||'" drop storage update indexes';
112+
dbms_output.put_line('run '||c_run_id||': partition '||cv.partition_name||' truncated');
112113
else
113114
execute immediate 'alter table t_index_test drop partition "'||sys.dbms_assert.simple_sql_name(cv.partition_name)||'" update indexes';
115+
dbms_output.put_line('run '||c_run_id||': partition '||cv.partition_name||' dropped');
114116
end if;
115-
116-
dbms_output.put_line('run '||c_run_id||': partition '||cv.partition_name||' dropped');
117117
end loop;
118118

119119
-- delete the rest
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
select *
2+
from t_session_events
3+
where waits#diff != 0
4+
or timeouts#diff != 0
5+
or time_waited_us_diff != 0
6+
;
7+
8+
--delete from t_session_stats where run_id >= 40;
9+
10+
with xyz as (
11+
select trunc(run_id / 10) as run_class,
12+
stat_class_id, stat_name,
13+
median(stat_value_diff) as stat_value_diff$median,
14+
stddev(stat_value_diff) as stat_value_diff$stddev,
15+
round(100 * stddev(stat_value_diff) / nullif(median(stat_value_diff), 0)) as stat_value_diff$stddev_pct,
16+
count(1) as runs#
17+
from t_session_stats SS
18+
where stat_value_diff != 0
19+
group by trunc(run_id / 10),
20+
stat_class_id, stat_name
21+
),
22+
xyz2 as (
23+
select run_class, stat_class_id,
24+
case
25+
when stat_name like '% time' then stat_name||' [s]'
26+
when stat_name like '% size' or stat_name like '% bytes' then stat_name||' [MB]'
27+
when stat_name like '% bytes from cache' then stat_name||' [MB]'
28+
else stat_name
29+
end as stat_name,
30+
case
31+
when stat_name like '% time' then round(stat_value_diff$median / 1000000, 3)
32+
when stat_name like '% size' or stat_name like '% bytes' then round(stat_value_diff$median / 1048576, 3)
33+
when stat_name like '% bytes from cache' then round(stat_value_diff$median / 1048576, 3)
34+
else stat_value_diff$median
35+
end as stat_value
36+
from xyz
37+
where runs# >= 4
38+
and ( stat_value_diff$median != 0 or stat_value_diff$stddev != 0 )
39+
)
40+
select *
41+
from xyz2
42+
pivot (
43+
any_value(stat_value) as stat
44+
for run_class in (
45+
1 as "RUN_1",
46+
2 as "RUN_2",
47+
3 as "RUN_3",
48+
4 as "RUN_4"
49+
)
50+
)
51+
order by 1, 2
52+
;

0 commit comments

Comments
 (0)