• Hi,

    Thank you very much for your comments and your suggestion.

    The stored procedure did have an interval parameter in the design phase, however, I found in the past two years since using it that 2 seconds is the minimum time to get meaningful figures, and from 4 or 5 seconds onwards the wait until you get results is too long.

    You can certainly use a parameter for the interval, however, this opens new possibilities for things to go astray, as many DBAs including me think of time in milliseconds, and it would be easy to pass by mistake 4000 instead of 4 as parameter if you have four seconds in mind. This would be less than ideal.

    The main use for this stored procedure is as a very fast tool to get the top processes consuming cpu, so although I am generally against hard coding, I decided not to use parameters - just call sp_whocpu and get the results.

    Thanks,

    Mircea