none
strange issue: same t-sql query, same execution plan, same server, same wait type but different time RRS feed

  • Question

  • Hi Experts,

    I was testing 2 T-sql Queris in SSMS against on SQL Server 2012

    Session 1: where col1 ='' or col2 in (select col2 from t2)

    Session 2: where col1 ='' union select t1.* from t1 join t2 on ***  

    I found session 1 took only 20+ seconds but session 2 took me more than 80+ seconds. I  was trying find out the root cause, finanlly, I copy past the same query from Session 1 to 2. Again, it took me more than  80+ seconds.

    I tested execution plan, same one

    I tested wait type, same one

    I even tested STATISTICS TIME: Session 2 is even better.... 2 sessions are not been blocked I'm sure of that. I was staring lock and wait.

    Could you please let me know what happend to Session 2?

    Saturday, June 29, 2013 8:27 AM

All replies