• Adam Machanic (8/31/2011)


    Marios Philippopoulos (8/31/2011)


    I noticed that there are 3 threads for that session: 3 records returned. Why would that be?

    3 threads? You're not joining to any views that deal with threads. Do each of the three rows have different request IDs? If so, EF is making use of MARS (Multiple Active Result Sets). If not, then something odd is going on or you're using a different version of the query than the one you posted.

    I shouldn't have used the term "threads"; I just meant three records returned for the same session_id.

    I will add request_id to the list of columns returned by the query to check for MARS.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]