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 (http://blog.SQLAuthority.com)

 

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

  1. 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)

    Like

  2. Pingback: SQLAuthority News – 1700th Blog Posts – Over 25 Millions of Views – A SQL Milestone Journey to SQLAuthority

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s