This repository was archived by the owner on Jul 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ with data as (
72
72
tblpages * bs as real_size,
73
73
(tblpages - est_tblpages) * bs as extra_size,
74
74
case
75
- when tblpages - est_tblpages > 0
75
+ when ( tblpages - est_tblpages > 0 and tblpages > 0)
76
76
then 100 * (tblpages - est_tblpages) / tblpages::float
77
77
else 0
78
78
end as extra_ratio,
@@ -82,7 +82,7 @@ with data as (
82
82
else 0
83
83
end as bloat_size,
84
84
case
85
- when tblpages - est_tblpages_ff > 0
85
+ when ( tblpages - est_tblpages_ff > 0 and tblpages > 0)
86
86
then 100 * (tblpages - est_tblpages_ff) / tblpages::float
87
87
else 0
88
88
end as bloat_ratio
Original file line number Diff line number Diff line change 77
77
result=$( cat $f_stderr )
78
78
result=${result: 23: $((${# result} ))}
79
79
tables_data=$( echo " $result " | jq -cs ' sort_by(-(.[]."capacity_used_percent"|tonumber)) | .[]' | jq -s add)
80
- let " min_table_size_bytes=$MIN_RELPAGES * 8192"
80
+ min_table_size_bytes=$(( MIN_RELPAGES * 8192 ))
81
81
82
82
echo " {\" tables\" : $tables_data , \" min_table_size_bytes\" : $min_table_size_bytes }"
83
83
You can’t perform that action at this time.
0 commit comments