Hi All,
Continuing on the above i have come up with couple of queries to evaluate the space utlisation at Database and table level
Could any one evaluate and let me know of any mistakes?
Database level
sel
databasename,
sum (currentperm)/(1024*1024) Space_Utilised_MB,
(max(currentperm)* (hashamp()+1))/(1024*1024) as Space_Utilised_Incld_Skew_MB,
sum(maxperm)/(1024*1024) Space_Alloted_MB,
avg(currentperm)/(1024*1024) Avg_Space_Per_Amp_MB,
max(currentperm)/(1024*1024) Max_Space_Amp_MB,
(Space_Alloted_MB - Space_Utilised_MB) Absolut_Space_Left_MB,
(Space_Alloted_MB - Space_Utilised_Incld_Skew_MB ) Space_Left_Consider_Skew_MB,
((1 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)))*100) AS SKEWFACTOR
from
dbc.diskspace
where
databasename = 'XYZ'
group by 1;
Table level
sel
databasename,
tablename,
sum (currentperm)/(1024) Space_Utilised_KB,
avg(currentperm)/(1024) Avg_Space_Per_Amp_KB,
max(currentperm)/(1024) Max_Space_Amp_KB,
((1 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)))*100) AS SKEWFACTOR
from
dbc.tablesize
where
databasename = 'XYZ'
group by 1,2;
Regards
R.Rajeev
Hi All,
Continuing on the above i have come up with couple of queries to evaluate the space utlisation at Database and table level
Could any one evaluate and let me know of any mistakes?
Database level
sel
databasename,
sum (currentperm)/(1024*1024) Space_Utilised_MB,
(max(currentperm)* (hashamp()+1))/(1024*1024) as Space_Utilised_Incld_Skew_MB,
sum(maxperm)/(1024*1024) Space_Alloted_MB,
avg(currentperm)/(1024*1024) Avg_Space_Per_Amp_MB,
max(currentperm)/(1024*1024) Max_Space_Amp_MB,
(Space_Alloted_MB - Space_Utilised_MB) Absolut_Space_Left_MB,
(Space_Alloted_MB - Space_Utilised_Incld_Skew_MB ) Space_Left_Consider_Skew_MB,
((1 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)))*100) AS SKEWFACTOR
from
dbc.diskspace
where
databasename = 'XYZ'
group by 1;
Table level
sel
databasename,
tablename,
sum (currentperm)/(1024) Space_Utilised_KB,
avg(currentperm)/(1024) Avg_Space_Per_Amp_KB,
max(currentperm)/(1024) Max_Space_Amp_KB,
((1 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)))*100) AS SKEWFACTOR
from
dbc.tablesize
where
databasename = 'XYZ'
group by 1,2;
Regards
R.Rajeev