SQL SERVER – SQLServer Quiz 2011 – Do you know your execution plan – Two questions – One Answer

My friend Jacob Sebastian has SQL Server Quiz 2011 launched. This time when he asked me to come up with quiz question – I wanted to come up with something which is new and make participant to think about it.

After carefully thinking I come with question which I really like to solve myself.

Here is the details:

1) Using Single table only Once in Single SELECT statement generate execution plan which have JOIN operator. Explain the reason for the same.

2) Using Single table only Once in Single SELECT statement generate execution plan which have parallelism operator. Explain the reason for the same.

Bonus: Create a single query which satisfy both of the above statement.

To answer this question and win exciting gifts please visit the SQL Server Quiz website.

Reference: Pinal Dave (https://blog.sqlauthority.com)

 

SQL Scripts
Previous Post
SQL SERVER – Guest Post – Architecting Data Warehouse – Niraj Bhatt
Next Post
SQLAuthority News – I am Presenting 2 Sessions at TechEd India

Related Posts

3 Comments. Leave new

  • This is very interesting question! I can not think of a one from the top of my head.

    Reply
  • Hi,
    For the second question, if one does a SELECT COUNT(*) or SELECT DISTINCT from a table, the execution plan contains a Parallelism operator.
    SELECT COUNT(*) FROM TableA

    The Parallelism operator performs the distribute streams, gather streams, and repartition streams logical operations (Source Books Online)

    Reply

Leave a Reply