For those of you who have been using SQL Profiler 2005 for a while, you probably are already aware of this. We've been using SQL Server 2005 for a few months now, but I hadn't touched SQL Profiler 2005 very much yet. Today I had to run a trace to check if any of the queries in our performance environment were taking too long. I always save the trace data to a table, so that I can easily run queries against it. Here is my typical query:
SELECT TOP 100 Duration, TextData
FROM TraceTable
WHERE TextData IS NOT NULL
ORDER BY Duration DESC
At first I was shocked to see Duration values of 1879000. In SQL Server 2000, this would have been 1879 seconds since Duration is stored in milliseconds. That's over 30 minutes! This was shocking to see, so I decided to check SQL Server 2005 Books Online. According to 2005 BOL, Duration is now stored in microseconds. Due to this, my query times were all under two seconds as expected.