Clustered Index

  • Nevertheless, I understood the concept you were trying to convey.

    The programmer inside of me had to point out a very specific detail. 😉

    I thought that was a very good question by the way, it shows understanding of how clustered indexes 'work'.

  • Nice question, no ambiguities. Really good explanation - I very much liked that you took the trouble to mention that TRUNCATE TABLE works even when the clustered index is disabled. Congratulations on providing the best question and explanation I've seen for quite some time.

    Two tiny niggles (which just go to show that one can find something to complain about even in the finest question): (i) query 1 is two statements, not one. If you call all statements "queries", it's two queries; if you call only DML statements queries it's zero queries, so there's really no way it can be one query.

    (ii) query 5 is two statements, and as both are dml statements most people would call them two queries - although perhaps it's reasonable not to count insert as a query.

    Tom

  • L' Eomot Inversé (3/5/2013)


    Nice question, no ambiguities. Really good explanation - I very much liked that you took the trouble to mention that TRUNCATE TABLE works even when the clustered index is disabled. Congratulations on providing the best question and explanation I've seen for quite some time.

    Two tiny niggles (which just go to show that one can find something to complain about even in the finest question): (i) query 1 is two statements, not one. If you call all statements "queries", it's two queries; if you call only DML statements queries it's zero queries, so there's really no way it can be one query.

    (ii) query 5 is two statements, and as both are dml statements most people would call them two queries - although perhaps it's reasonable not to count insert as a query.

    thanks for pointing that out .. I think, word "statement" (and,may be, a batch separator "Go") could have been a better dessert..:-)

    ~ demonfox
    ___________________________________________________________________
    Wondering what I would do next , when I am done with this one :ermm:

  • A nice one for my Tuesday - thanks!

  • Nice question and great explanation. Thanks!

  • Thought 5 minutes before getting a correct answer 😀

  • A good question, but also a little concerned about the option of defrag. The tables has 0 pages, I have no idea how you would fragment nothing.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Good question/explanation Demonfox .

    @mit

  • Good one,by elimination method worked as well.

    “When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris

  • Thanks for a very good question.

  • Thanks...

    Great question..

  • This was the easiest question I have seen in a while!

    Why you ask?

    Well demonfox gave a nice hint :-):

    Note : All queries execute without error, please ignore syntax error, if any; I am sure there is none.

    This rules out 5 and 6 and leaves only one option.

    But really a very nicely done question. Please keep it up!

    Best Regards,

    Chris Büttner

  • missreaded it not carefull enough

    thanks

  • Good question. +1

  • Yeah, Got it.

    If you disbale the clusterd index then the insert wouldn't be possible.

    But after rebuild you can.

    I knewn it.

Viewing 15 posts - 31 through 44 (of 44 total)

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