So I’ve been running a trace on some SQL 2005 servers for awhile now and I’m starting to analyze them. One of the things I look at is statement top 10 duration. It was interesting to see all 10 entries to on every day I monitored to be:
TextData – exec sp_readrequest @receive_timeout=600000
ApplicationName – DatabaseMail90 – Id<2224>
Duraction – 609325251
The Id varied and the duration went up and down a little but that seemed interesting to me. I initially thought I had a Database mail problem and went to investigate. Nothing seemed out of place. So I went to BOL and looked up sp_readrequest only to find out it is an undocumented sp.
In fact doing a google search only comes back with 14 entries and only 1 really gives decent information which you can see here. But basically it said to ignore the entries as it’s not doing any Reads, Writes, or CPUs as it is essentially doing a WAITFOR. Evidently this is due to the fact that Database Mail utilizes Service Broker to operate.
While I understand and don’t have a problem with things happening behind the scenes that should be ignored, I do think it’s poor that these things we’re supposed to ignore are undocumented anywhere. In effect, how do we know it’s performing "by design" and should be ignored if we don’t have any information about it?