Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Query Plan Execution Order


Query Plan Execution Order

Author
Message
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
Comments posted to this topic are about the item Query Plan Execution Order



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
bitbucket-25253
bitbucket-25253
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5689 Visits: 25280
Blew that one as did someone before me.

Learned a lot by reading your references - thanks for those.

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
antony-688446
antony-688446
Old Hand
Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)Old Hand (340 reputation)

Group: General Forum Members
Points: 340 Visits: 371
Looks like I am the first to get it right! :-D

Makes a change.

I am normally the last person to get it wrong.

Nice question, with lots of interesting articles.
M&M
M&M
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2595 Visits: 3898
This might be the toughest QotD.

M&M
tommyh
tommyh
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1560 Visits: 2000
Going to stick my neck out and say that its wrong.

Yes the stream aggregate gets called first... but it hasnt finished. So is the important part which gets called first or which gets finished first? Personally i think its the part that gets finished first thats important (or more precisly the thing that performs its purpose first). I cant say a function has been executed when it hasnt actually done anything.

Could be a language thing though that i put a different meaning into "executes" then everyone else :-)

/T
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
tommyh (10/27/2011)
Going to stick my neck out and say that its wrong.

Yes the stream aggregate gets called first... but it hasnt finished. So is the important part which gets called first or which gets finished first? Personally i think its the part that gets finished first thats important (or more precisly the thing that performs its purpose first). I cant say a function has been executed when it hasnt actually done anything.

Could be a language thing though that i put a different meaning into "executes" then everyone else :-)

The learning point today was about execution order (hence the title). Query plans are pipelines, and the intention was to highlight something that most people misunderstand about that. I'm sorry the way I phrased it differs from your intuitive understanding of 'executes', if I could give you your two points, I would. That's not to say that I agree with you (I don't) but points are free, and I like people to be happy :-)



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
spaghettidba
spaghettidba
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5730 Visits: 13305
Great question, Paul, and great explanation.
Looks like you tricked most of us (myself included).

--
Gianluca Sartori

How to post T-SQL questions
spaghettidba.com
@spaghettidba
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
Gianluca Sartori (10/27/2011)
Great question, Paul, and great explanation.
Looks like you tricked most of us (myself included).

Thanks, but I want to say that I really really really didn't set out to trick anyone with this. It was intended as a follow-on question to my previous one (Table Access Order) but the scheduling meant they came much further apart in time than I intended. The formatting also got messed up in the explanation, but hey ho. Hopefully there's enough value in the learning point that I get away with it.



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
skanker
skanker
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1019 Visits: 1385
Great question. I got it wrong but learned something which is a good start to the day.
call.copse
call.copse
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2848 Visits: 1860
Nice one. I got it right - yay! - though I had to spend 20 minutes reading up (sorry work) first, as I was determined to get it right.

I think the setter was quite correct. If he had said which FINISHES executing first that would be a different matter.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search