Which column to trust about the event order in a profiler result?

Posted on

Question :

Hi I recorded some events using the SQL profiler and I want to work out the exact order of what happened first. But I am having trouble in this basic task, because what ORDER BY EventSequence showed was different to ORDER BY EndTime and also different to ORDER BY RowNumber

Which column should I trust?

Answer :

Taken from Microsoft’s SQL Server PSS Blog:

The Event Sequence is the order the trace event was internally created in the server which can be different from the physical file order due to various timing and design issues. The Event Sequence gives you a more accurate representation of the event order. When looking at trace data from SQL Profiler or one loaded in the database you should order by the Event Sequence.

Leave a Reply

Your email address will not be published. Required fields are marked *