Resolving a Skew

UDA
Enthusiast

Resolving a Skew

Hi!

What would be the steps to resolve CPU skew? I know the queries which has a high CPU time as per the DBQL table. How do I calculate CPU skew from this? And how do I resolve a CPU skew?

Thanks in advance!
2 REPLIES
Enthusiast

Re: Resolving a Skew

Can anyone please provide some pointers?

Thank you!!!
Enthusiast

Re: Resolving a Skew

I calculate skew as follows:

(1 - (((AMPCPUTime + ParserCPUTime) / NULLIFZERO(NumOfActiveAMPs)) / NULLIFZERO(MaxAMPCPUTime)))

From the DBQLogTbl. Its the ratio of your AverageAmpCPU and your MaxAmpCPU. The lower the value here, the closer the average and max are to each other.

To correct the skew, you really need to look at the individual steps. A similar measure can be calculated form the stepinfo table. This will tell you which steps are the most skewed. Start by looking at what these steps are doing and see if there is opportunity to balance the work. Better indexing and better statistics are often good tools here.