CLR_AUTO_EVENT
Dec 13, 2007I have been checking out this CLR_AUTO_EVENT, according to performance dashboard and sys.dm_os_wait_stats we have lot of wait there. More then 45% of total wait on the server. I fired up my local server and installed assembly a sample table and started to reproduce the behavior. After running more 1000 call to function CLR_AUTO_EVENT start to accumulate. I started to comment out a bit of the logic. But still CLR_AUTO_EVENT builds up.
<Microsoft.SqlServer.Server.SqlFunction()> _
Public Shared Function fu_VarFilter( _
ByVal varKodIn As SqlString, _
ByVal varFilterIn As SqlString _
) As SqlBoolean
€˜Normal there is logic here that select what row to return. But commed it out and still the
' CLR_AUTO_EVENT builds up.
Return True
End Function
Call
select * from tfanvar WHERE dbo.fu_VarFilter('21-1-1-1-3', VldVar) = 1
In this way the whole table is scan and all rows are delivered , With this completely empty function I get CLR_AUTO_EVENT start to accumulate
Shall I even care about this wait? Or what? Is that normal?