All Forums Database
KVB 124 posts Joined 09/12
29 Jun 2014
Skewfactor

Hi ,
I fired the below query on a table and got 0.57 as the skew factor.Is it tolerable or not?
 
select tablename,
sum(currentperm)/(1024*1024) as Currentperm,
(100-(avg(currentperm)/max(currentperm)*100)) as skewfactor
from
dbc.tablesize
where databasename='DBNAME'
and tablename='TABLENAME'
group by 1
 
 

ulrich 816 posts Joined 09/09
30 Jun 2014

Values < 1 are OK. You might not getting better even if you use a UPI - depending on your number of rows and number of vprocs. 
But as so often there are no fix numbers to say what is acceptable and what is not. 
Sometimes skew of 10 can be accepted in case is serves a very good access pattern and data would be redistrubuted to this pattern in the majority of the SQLs accessing this table. Sometimes a skew of 5 can be reviewed - if it is the biggest table of the system.
A good starting point for making decissions it the difference between max(currentperm) * #vprocs - sum(currentperm - which shows you the space "waisted". If this is big and you can't justify the PI as a good access path consider to check for a new PI.
Ulrich

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

You must sign in to leave a comment.