Queries

  • Jan Van der Eecken (11/28/2012)


    Remember, the parser and the query optimizer are two very distinct animals.

    Thanks Jan. You are absolutely correct. I should have said query processor.

    Sean

  • Great discussion on this topic and question. Had no clue myself.

  • Jan Van der Eecken (11/28/2012)


    ...

    To Dave62, just a thought, given all the negative feedback you had, maybe it would have been a better idea to just post this one to the 2008 forum and ask if anyone could explain this odd behaviour? ...

    Thanks for the suggestion Jan but when I came across this behavior, I thought it was interesting and did not really have a question I needed answered in on of the forums. Along with the negative feedback there have also been a few others who found it interesting as I did. So I think I'll just continue to share things here if I find them interesting and enjoy the discussion that ensues.

    After all, if I try to post something that not one person would find something to complain about then I'd most likely end up not posting anything. :rolleyes:

    Enjoy!

  • Dave62 (11/29/2012)


    Jan Van der Eecken (11/28/2012)


    ...

    To Dave62, just a thought, given all the negative feedback you had, maybe it would have been a better idea to just post this one to the 2008 forum and ask if anyone could explain this odd behaviour? ...

    Thanks for the suggestion Jan but when I came across this behavior, I thought it was interesting and did not really have a question I needed answered in on of the forums. Along with the negative feedback there have also been a few others who found it interesting as I did. So I think I'll just continue to share things here if I find them interesting and enjoy the discussion that ensues.

    After all, if I try to post something that not one person would find something to complain about then I'd most likely end up not posting anything. :rolleyes:

    Enjoy!

    +1

  • Thanks for the question

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Choose 0 and get it wrong, what a winner!! 😛

  • I also selected 0 for this answer. None of the statements returned any data. They actual execution plan confirms this.

    Cheers,

    Andre Ranieri

  • A query has nothing to do with returning data. Plenty of queries are valid but return no data.

  • Not being sure how many rows would be affected by those statements, I tested with SQL 2008. It worked for me but not sure what I've learnt.

    Dave Morris :alien:

    "Measure twice, saw once"

  • Wow... lots of posts about this.

    I understandthe Author wanted us to realize that no matter what your TSQL is, when you display an execution plan at least one Row has to be selected from the Plan cache to display it.

    Could have been worded better though.

    If more that 80% don't get your question right, you should reconsider what you are asking and how you re asking it. 😉

  • SanDroid (1/18/2013)


    If more that 80% don't get your question right, you should reconsider what you are asking and how you re asking it. 😉

    I completely disagree. There are quite a lot if tricky questions that can be asked, that are relevant and may be answered wrong by a lot of people. The clue about these questions is to learn, not that most of the answers shall be correct.



    Ole Kristian Velstadbråten Bangås - Virinco - Facebook - Twitter

    Concatenating Row Values in Transact-SQL[/url]

  • SanDroid (1/18/2013)


    ... If more that 80% don't get your question right, you should reconsider what you are asking and how you re asking it. 😉

    That sounds logical. But of course one doesn't have this knowledge (about 80% don't get the question) until after the question has already been asked... :rolleyes:

    Enjoy!

  • got it wrong as i dint understand:(

  • The answer for this is actually 0. if you run the estimated execution plan you get a result of 1 row referring to the execution plan results itself. you can follow that logic by running sql profiler and looking for the rows affected.

    If you were to run the actual execution plan on this while executing you get 0 rows.

  • time loss !

    what can be the interest of knowing such a thing ?

Viewing 15 posts - 46 through 60 (of 60 total)

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