Know Your SQL Objects

  • SQLkiwi (5/13/2011)


    Tom.Thomson (5/13/2011)


    (1) New Zealanders (or at least one of then) don't use the position in the clause of "only" to distinguish the three possible meanings that the combination of "only" with "may" can express in the same way the most British people do...

    I can't speak for all four million of us, but I had to choose between two interpretations:

    "Pages in extents may be assigned to only one object"

    1) "Pages in extents might (all) be assigned to a single object" (an observation)

    or...if we are used to reading technical specifications and the like, perhaps as:

    2) "You can only assign pages from an extent to the same single object" (an instruction).

    Yes, I had the same two to choose between but because "only" came where it did I decided it probably didn't exclude the multiple objects case (but if only had come immediately before "to" I would have decided it was intended to exclude that case). And other positions of only (immediately before "be" or after "object" or before "pages" would indicate more or less probability that the exclusive meaning was intended or point to a third meaning which in this context makes no sense. I suspect this effect of word order is either weaker in NZ or altogether different there.

    It is very hard to write things that mean the same to everybody, and it is also a very neglected skill (and I'm not much good at it - often when I remember to try I get horribly verbose).

    Tom

  • Steve Jones - SSC Editor (5/13/2011)


    Brandie wrote a good question, but I can see the confusion, so I've edited it.

    Comments encouraged on the changes.

    I'm even more confused now ... :w00t:

    The edited correct answer reads:

    [...] Rows CAN span multiple pages.

    [...] Ref: Pages and Extents - http://msdn.microsoft.com/en-us/library/ms190969.aspx Rows CANNOT span pages

    That's perhaps my lack of command of English (being Austrian = non-native English), but to me this looks like a contradiction.

    What's even more confusing: For some questions, BOL definitions are deemed the ultima ratio, no discussion allowed and that's how it is (even if one's own logical understanding, better knowledge and common sense tell you the opposite).

    In this case--well, better knowledge prevails over BOL (or should I say the interpretation of that item in BOL by the majority of the members of this forum?).

    While personally I welcome the learning, even if that means to correct or contradict the 'official' documentation (read BOL), I do miss a firm steer in this respect--it should either be the plain facts that count, or 'book knowledge' (how it's being offcially published by the vendor).

    Please, don't get me wrong--I'm viewing this from the learning perspective; and the above 'correct answer' would leave me as a novice with a mouth wide open, questioning my ability to comprehend.

    Thanks,

    Michael

  • michael.kaufmann (5/16/2011)


    I'm even more confused now ... :w00t:

    The edited correct answer reads:

    [...] Rows CAN span multiple pages.

    [...] Ref: Pages and Extents - http://msdn.microsoft.com/en-us/library/ms190969.aspx Rows CANNOT span pages

    BOL is wrong on that page. The overflow and lob data imply that the data that makes up a row can be on two different pages (or more). I think the BOL author copied from previous verisons, and despite later in the paragraph that it lists "this restriction may be relaxed", they have not corrected the initial sentence. It should read that non-variable length data types may not span across pages. So I can't have 9k worth of INT columns.

  • UMG Developer (5/13/2011)


    Steve,

    If you lookup may in a dictionary you will notice that item 4 is: "shall, must —used in law where the sense, purpose, or policy requires this interpretation."

    So it is perfectly reasonable to read that as saying that the pages in an extent can only be assigned to a single object. (Which is how I read it.)

    I'm not sure I find that a good definition of "may", though this isn't really law. I think more about "may I have a cup of coffee". This is a question.

    In terms of "can be assigned to one object", that speaks to me of a possibility. It is possible. An extent can be assigned to one object. An extent can also be assigned to multiple objects. not the same extent, but any non-specific extent can either be one object or multiple objects.

  • Paul Randal (5/13/2011)


    Steve - I got this wrong because your wording is broken. Extents can NOT be owned by multiple objects. When an extent is a mixed extent, it is 'owned' by the allocation system - technically object ID 99. The individual pages are owned by multiple objects, but none of the objects own the extent.

    Thank you Paul! I thought I was a little crazy for having that thought when I first read the question. The question made me think that somehow ownership of the whole mixed extent might somehow be "shared" by multiple objects and I was puzzling over how that might be true. Guess I have not gone through enough MCM reading material yet...

    Great comment and a great question and discussion! As always, the more controversial the QOTD, the better I like it as it really opens the topic up.

    Peter Trast
    Microsoft Certified ...(insert many literal strings here)
    Microsoft Design Architect with Alexander Open Systems

  • Steve Jones - SSC Editor (5/16/2011)


    michael.kaufmann (5/16/2011)


    I'm even more confused now ... :w00t:

    The edited correct answer reads:

    [...] Rows CAN span multiple pages.

    [...] Ref: Pages and Extents - http://msdn.microsoft.com/en-us/library/ms190969.aspx Rows CANNOT span pages

    BOL is wrong on that page. The overflow and lob data imply that the data that makes up a row can be on two different pages (or more). I think the BOL author copied from previous verisons, and despite later in the paragraph that it lists "this restriction may be relaxed", they have not corrected the initial sentence. It should read that non-variable length data types may not span across pages. So I can't have 9k worth of INT columns.

    This wasn't exactly about BOL--but on the edited 'correct answer' that now bears a contradiction in it.

    In my opinion the entire 'correct answer' should have been rewritten, and while the link to BOL might still have been included, the phrase rows cannot span pages should have been removed and your explanation included instead.

    Thanks,

    Michael

  • Ah, sorry. The explanation editor box is small for me and I didn't see that part of the explanation. It's been fixed.

    My apologies.

  • excellent question. thanks

    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

  • The below statement is confusing:

    "Pages in extents may be assigned to only one object"

    Does it mean:

    - 1 object and no more than 1 object (false), or

    - 1 object is possible (true)

    Otherwise, a DBA should get the question right.

  • "may" speaks to possibilities. Extents can be uniform (one object stored) or mixed (multiple objects stored)

Viewing 10 posts - 76 through 84 (of 84 total)

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