Help!!!

  • I need help with this two questions.

    you have performed a large insertion and/or deletion, or you may have bulk inserted some sufficiently large data that is causing sql server to return a wrong query plan. what is your typical solution?

    if you want to copy a small table with its data into a new table, what is your best option. (if select into answer, ask why it would be problematic if the data set is large).

  • Those seem like interview questions and people here don't like to answer to them because it helps others to cheat in interviews. A good interviewer will know the difference between someone who knows and someone who just learned the answers.

    What have you researched so far about this issues?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • somubhandaru23 (2/11/2015)


    You have performed a large insertion and/or deletion, or you may have bulk inserted some sufficiently large data that is causing sql server to return a wrong query plan. what is your typical solution?

    if you want to copy a small table with its data into a new table, what is your best option. (if select into answer, ask why it would be problematic if the data set is large).

    Interview? Exam?

    What do you think the answers are?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • ... (if select into answer, ask why it would be problematic if the data set is large).

    BTW, if I would hear that back from interviewer for SELECT INTO answer, it would show to me that he or she, most likely, does not know how to use it properly...

    The better additional question would be:

    "What should you be aware of when using SELECT INTO for large datasets."

    as whatever method you use to insert really large data sets, it would be kind of "problematic"...

    As per all others here, if you do some research and try to anser all the above questions yourself and post it, everyone here would be more than happy to correct you or/and add more details to your answers and help you with understanding the subject dipper.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • somubhandaru23 (2/11/2015)


    if you want to copy a small table with its data into a new table, what is your best option. (if select into answer, ask why it would be problematic if the data set is large).

    Hmmph... I wonder if they still believe that it will lock up all of TempDB like it did in the RTM of 6.5.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (2/12/2015)


    somubhandaru23 (2/11/2015)


    if you want to copy a small table with its data into a new table, what is your best option. (if select into answer, ask why it would be problematic if the data set is large).

    Hmmph... I wonder if they still believe that it will lock up all of TempDB like it did in the RTM of 6.5.

    Also, they could experience no benefits of it and/or transaction log maxed out when using SELECT INTO and not having DB in simple or bulk logged recovery mode, or SELECTing INTO from tables with identity columns...

    I wonder what they would use instead? BULK INSERT? Batched insert?

    The first one would have the same "problems" as SELECT INTO, the second one is nothing else than splitting "data set is large" to multiple "small data sets"...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Agreed. The more you know, the longer the answers to such "simple" questions will be.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

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