Clustered Index

  • Hugo Kornelis (3/5/2013)


    Normally, I either post with additional information, or do not post at all. But in this case, even though I didn't see anything I could add to the explanation, I felt a compliment was in order.

    All this credit goes to demonfox. Well done demonfox.

    --
    Dineshbabu
    Desire to learn new things..

  • Awesome put. Thank for posting very neatly.

    (i kind of had a catch that after disabling and the next statement it rebuilds.... so i assumed it might activate the index again... and got it right... i never used DISABLE before so had no idea at all if that can be done, it was very new learn for me.)

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • Good question.

    I might have changed up the options a bit, though. Once you realize the first two are true (and those are easy), then by the nature of the options given, III and IV must also be true. I didn't even bother to read them, because they're in every answer where I and II appear. Then it's just a matter of figuring out whether V or VI was true.

    Still a great question, it could just have used a bit of fine tuning in the options.

    ron

    -----
    a haiku...

    NULL is not zero
    NULL is not an empty string
    NULL is the unknown

  • edit: misread the question.

    But, how can (iv) be true?

    How can the index rebuild remove the fragmentation from the index? The table is empty at that step so it should already be at 0.00% fragmentation.

  • "REBUILD enables a disabled index."

    D'oh!

  • Dineshbabu (3/5/2013)


    Hugo Kornelis (3/5/2013)


    Good question, and good explanation. Well done!

    First time I'm seeing Hugo's post without any information.

    Dineshbabu you are right :-:-)

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!

  • I had to do some research for this one. good question.

    --------------------------------------------------------------------------------------
    Hai Ton
    My Db4Breakfast blog.

  • Lokesh Vij (3/4/2013)


    Nice question demonfox... Overlooked and got the question wrong. Lesson learnt! 🙂

    I underlooked... and didn't completely read option v...

    I'd like to say the text ran together and I just missed it... but I was concerned about some other stuff running at the time... and just got lazy... 🙁 missed the part in the v where it said the select failed. since vi talked about total failure, I presumed v was about total success... not insert success followed by select failure... :/



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Lokesh Vij (3/4/2013)


    Nice question demonfox... Overlooked and got the question wrong. Lesson learnt! 🙂

    I underlooked... and didn't completely read option v...

    I'd like to say the text ran together and I just missed it... but I was concerned about some other stuff running at the time... and just got lazy... 🙁 missed the part in the v where it said the select failed. since vi talked about total failure, I presumed v was about total success... not insert success followed by select failure... :/



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Stuart Davies (3/5/2013)


    Very good question Demonfox - thanks.

    Took four re-reads and two cups of coffee before getting my point this morning

    +1

    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]

  • mtassin (3/5/2013)


    Lokesh Vij (3/4/2013)


    Nice question demonfox... Overlooked and got the question wrong. Lesson learnt! 🙂

    I underlooked... and didn't completely read option v...

    I'd like to say the text ran together and I just missed it... but I was concerned about some other stuff running at the time... and just got lazy... 🙁 missed the part in the v where it said the select failed. since vi talked about total failure, I presumed v was about total success... not insert success followed by select failure... :/

    Glad to know that I wasn't the only one this happened to. Thanks for the great question.



    Everything is awesome!

  • Best QOD in quite some time. Question & explanation clear and concise, got the question right, AND I learned two things to boot. Thanks demonfox!

  • ggeier (3/5/2013)


    How can the index rebuild remove the fragmentation from the index? The table is empty at that step so it should already be at 0.00% fragmentation.

    Nice catch!!

    I think the intent of the question was that Rebuilding index will remove fragmentation + enable the index.

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • 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

  • Lokesh Vij (3/5/2013)


    ggeier (3/5/2013)


    How can the index rebuild remove the fragmentation from the index? The table is empty at that step so it should already be at 0.00% fragmentation.

    Nice catch!!

    I think the intent of the question was that Rebuilding index will remove fragmentation + enable the index.

    "If any " ; I missed that completely .. 😛

    << if everything seems to be going well , you must have overlooked something >> -(as in Ron's signature) 😀

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

Viewing 15 posts - 16 through 30 (of 44 total)

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