Presentations

Coming soon.

Be Sociable, Share!

One thought on “Presentations

  1. I have a fun one for your vote presentation, from a “discussion” at work.

    http://nashville.sqlpass.org/Home.aspx?EventID=5281

    one is clearly superior. But why is it faster with the same plan?

    /****** Script for SelectTopNRows command from SSMS ******/

    SET STATISTICS TIME ON;
    SELECT ID, [DatabaseName]
    FROM t1
    EXCEPT
    select ID, [DatabaseName] FROM t2 OPTION (RECOMPILE, maxdop 4)

    select ID,[DatabaseName] from t1
    where not exists ( select 1 from t2 where t1.ID = t2.ID and t1.DatabaseName = t2.DatabaseName) OPTION (RECOMPILE, maxdop 4)

    select t1.ID, t1.[DatabaseName]
    from t1
    LEFT JOIN t2
    on t1.ID = t2.ID
    and t1.DatabaseName = t2.DatabaseName
    where t2.ID is null
    and t2.DatabaseName is null
    OPTION (RECOMPILE, maxdop 4)

    SET STATISTICS TIME OFF;

Leave a Reply

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