File Groups

  • Comments posted to this topic are about the item File Groups

  • knew the answer but clicked on the wrong button 🙁

    "Keep Trying"

  • ChiragNS (10/19/2009)


    knew the answer but clicked on the wrong button 🙁

    I didn't, although I should have.:Whistling: Overlooked the fact that the constraint was clustered. Good question 😛

  • So it just ignores the FG2 reference? The fact that it essentially corrects the developer's mistake is great, I guess, but shouldn't the engine inform the developer that it's doing so?

    "Beliefs" get in the way of learning.

  • nice question, I missed the clustered part.

    The engine definitely should inform someone if this doesn't work.

  • Very good question. I was asked this question in an interview.

    Q). What's the easiest and fastest way to move data of a table from file1 to file2?

    A). Move the clustered index from file1 to file2.

    SQL DBA.

  • SanjayAttray (10/19/2009)


    Very good question. I was asked this question in an interview.

    Q). What's the easiest and fastest way to move data of a table from file1 to file2?

    A). Move the clustered index from file1 to file2.

    Why would that be faster than say, creating a target table on file2 and inserting all into it from the source table?

    Gaby________________________________________________________________"In theory, theory and practice are the same. In practice, they are not." - Albert Einstein

  • Great question. I learned something new.:-D

  • Give us more i love these kind of questions.

    Alex S
  • Steve Jones - Editor (10/19/2009)


    nice question, I missed the clustered part.

    The engine definitely should inform someone if this doesn't work.

    Funny thing. I missed this because I DID see the clustered part and figured that SQL would complain about it. Oh, well; learned something here for sure.

  • I knew the data would be with the clustered index, but I wasn't sure whether the inner reference or outer reference would win, or whether an error would be thrown. I spent 10 minutes setting up a test environment to make sure. I would have been guessing among my three options otherwise.

  • GabyYYZ (10/19/2009)


    SanjayAttray (10/19/2009)


    Very good question. I was asked this question in an interview.

    Q). What's the easiest and fastest way to move data of a table from file1 to file2?

    A). Move the clustered index from file1 to file2.

    Why would that be faster than say, creating a target table on file2 and inserting all into it from the source table?

    I suppose part of the question was easiest and fastest...

    Otherwise nice questions after all.

    What you don't know won't hurt you but what you know will make you plan to know better
  • I knew this one because I've been "bit" by it before. Would indeed be better if there was a warning.

    And for the why not create another table and move the data into that, there's DDL issues and possibly space issues, too. It's also many more steps.

  • Ouch -you got me - I didn't notice "clustered".

    And I've complained about people not reading questions carefully:blush:!

    Tom

  • Got this one wrong. I figured since there was a contradiction in the statement, SQL should complain. Why does it choose FG1 over FG2? Seems arbitrary to me.

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

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