Query Plan Execution Order

  • Comments posted to this topic are about the item Query Plan Execution Order

  • 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[/url]
    Before posting a performance problem please read[/url]

  • Looks like I am the first to get it right! 😀

    Makes a change.

    I am normally the last person to get it wrong.

    Nice question, with lots of interesting articles.

  • This might be the toughest QotD.

    M&M

  • 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

  • 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 🙂

  • Great question, Paul, and great explanation.

    Looks like you tricked most of us (myself included).

    -- Gianluca Sartori

  • 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[/url]) 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.

  • Great question. I got it wrong but learned something which is a good start to the day.

  • 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.

  • Great question for learning - cheers 🙂

    And, more importantly, congrats on winning the Webb Ellis, SQL Kiwi!

  • This was removed by the editor as SPAM

  • Good question, Paul!

    I had the correct answer,but only thanks to the fact that I attended SQL Saturday in Portland a few weeks back (just before the PASS Summit). I don't recall who said it, probably either Buck or Rob, but the quote itself will always stick: "Exection plans suck". Refering to the little-known fact that data is not pushed from right to left (as most people usually read plans, myself included), but pulled ("sucked") by the top-left operator from the operator to the right and below it.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Tough question with good references. I missed it but I learned something today.

    http://brittcluff.blogspot.com/

  • really, it's a very good question!!!

    thanks Paul!!


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!

Viewing 15 posts - 1 through 15 (of 103 total)

You must be logged in to reply to this topic. Login to reply