Partitioned index

  • Comments posted to this topic are about the item Partitioned index

    Igor Micev,My blog: www.igormicev.com

  • Unless I did something very wrong, I had completely different answers *sigh* TGIF

    Hope this helps...

    Ford Fairlane
    Rock and Roll Detective

  • I got it right ... :w00t:

    friday rocks.... :hehe:

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

  • I thought it's highly likely, since the data is not provided , that DatCreated and dateModifed could be repeated ; so basically, Combined with Id is perfect uniqueness considering the inclusion of partition scheme column is necessary.

    Also, there was supposed to be 2 answers only , and the correct two were best fit.

    EDIT :

    There are million rows in the table and there are rows with same values(dates) for DateCreated and DateModified columns. You create a partition function

    It was provided my bad ...

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

  • Great question! Easier than it first looks, if you take into account that a primary key has to be unique and that a clustered unique index needs to include the partitioning column.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • This was removed by the editor as SPAM

  • Nice straightforward question.

    Surprised it's 3 points, though; it's rather easy. The description of the data in the table (there are rows with same values for these two columns) rules out statements 1,2 and 6 since the primary key must be unique, so one is left to chose two out of statements 3, 4 and 5. Now if one knows that the arguments of the partition function have to be a subset of the clustered index key that answer is immediately obvious. But even if one doesn't it's easy to see that statements 4 and 5 are identical in form while statement 3 is quite different so if two are right and one wrong the two have to be 4 and 5.

    I imagine that so many people (71%) so far got it wrong mostly because they were flummoxed by partitioning, which they don't use, and didn't try to reason about it (or even do a little looking up in BoL); maybe some forgot that primary keys are always unique, but I hope that was at most very few indeed. And some may have read "there are rows with same values(dates) for DateCreated and DateModified columns" as saying that each of those columns individually had duplicates rather than that there were at least two rows which matched in both columns, so that statement 2 wasn't ruled out; to my mind that's not what the words mean, but others may have differed.

    The really startling thing about the numbers is that with 48% picking statement 4 and 46% statement 5 only 29% picked both; so 36% picked one of those but not the other - 70% of the people who knew enough to pick at least one of the two right answers didn't notice that these statements were, in respect of the factors that determine correctness (but not of course in terms of the particular column name), absolutely identical.

    And there's an little error in the explanation, which states that (DateModified,DateCreated) is an altogether mythical object, a candidate key that doesn't guarantee uniqueness :w00t:. If it were indeed a candidate key statement 2 would have worked, not failed. But it's obvious what the writer meant when he wrote that, so it's not a mistake that matters, just one that adds a little entertainment to reading the explanation.

    edit: arithmetic

    Tom

  • Great question, thank you for posting.

    🙁 (I am disappointed with myself, as my low self-esteem level is high normally.... today it is outstanding...)

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

  • L' Eomot Inversé (11/2/2012)


    Nice straightforward question.

    Surprised it's 3 points, though; it's rather easy.

    At the current moment, 66% didn't seem to think so, having got it wrong! :w00t:

    Delighted to say I got it right, having followed the logic that the key had to be unique.... 🙂 Good question, though, thanks.

  • Agreed. At first look, it appears to be a difficult question and if you attemp to run the scripts without the data, 4 out of the 6 statements work. But remembering that the data includes 1 million rows where the two date fields can be duplicates means that the clustered index requires the ID field in order to be unique.

  • Primary key that is... Not clustered index. Time for coffee on the West Coast.

  • Sean of the Lynchmob (11/2/2012)


    L' Eomot Inversé (11/2/2012)


    Nice straightforward question.

    Surprised it's 3 points, though; it's rather easy.

    At the current moment, 66% didn't seem to think so, having got it wrong! :w00t:

    Delighted to say I got it right, having followed the logic that the key had to be unique.... 🙂 Good question, though, thanks.

    We point-whores like the question.

  • demonfox (11/1/2012)


    I thought it's highly likely, since the data is not provided , that DatCreated and dateModifed could be repeated ; so basically, Combined with Id is perfect uniqueness considering the inclusion of partition scheme column is necessary.

    Also, there was supposed to be 2 answers only , and the correct two were best fit.

    EDIT :

    There are million rows in the table and there are rows with same values(dates) for DateCreated and DateModified columns. You create a partition function

    It was provided my bad ...

    +1

    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

  • This question wasn't as difficult as I first thought. It does help that I have used partitioning a few times though. Happy Friday all!

  • I should have looked at and answered this one this morning.

    Instead I'm sitting here after a big lunch barely concious... I think I picked answers at random.



    --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]

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

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