SQL Server Performance


Discussion in 'SQL Server 2005 CLR' started by jn4u, Dec 13, 2007.

  1. jn4u Member

    Ihave been checking out this CLR_AUTO_EVENT, according to performancedashboard and sys.dm_os_wait_stats we have lot of wait there. Morethen 45% of total wait on the server. I fired up my local server andinstalled assembly a sample table and started to reproduce thebehavior. 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


    select * from tfanvar WHERE dbo.fu_VarFilter('21-1-1-1-3', VldVar) = 1

    Inthis way the whole table is scan and all rows are delivered , With thiscompletely empty function I get CLR_AUTO_EVENT start to accumulate

    Shall I even care about this wait? Or what? Is that normal?
  2. satya Moderator

    How many CLR routines you have and I don't see any issue as long as the information is reported properly.

Share This Page