But since it is in the "beta" stage, there are some problems with usability and stability.
For example, when I run the "trace summary" menu item on my trace I've got an exception. It seems (thanks to reflector) the cause is in SqlTimeBreakDown function in SQL server Trace Parser database.
When I add condition to exclude division by zero, it results in empty
grid instead of exception.
This is the fix:
if @SQLTime>0  -- <<<<<<<<<<<<<<<< the fix
               begin
               INSERT INTO @BreakdownInformation
               SELECT (sum(PrepDuration) * 100)/@SQLTime [% of time in SQL Prep],(
sum(BindDuration) * 100)/@SQLTime [% of time in SQL Bind],
(sum(RowFetchDuration) * 100)/@SQLTime [% of time in SQL Row Fetch],
(sum(ExecuteDuration) * 100)/@SQLTime [% of time in SQL Execution]
                               from SqlQueryInstance
                               WHERE traceId = @Traceid AND sessionid = @sessionid
       end  -- <<<<<<<<<<<<<<<< the fix
               RETURN
No comments:
Post a Comment