"select into "query

  • SELECT * INTO REVENUE.DBO.TOTALCK FROM OBBEAVER.REVENUE.DBO.TOTALCK

    I am running the above query on to a table from another server but i see most of the IO on tempdb and also it is growing drastically. I was thinking that the above query will not use tempdb, please explain behind the scene.

  • any idea why this would use temp table?

  • Hi,

    Do you have trigger on the target table?

    ...and your only reply is slàinte mhath

  • nope, it does not have any trigger.

  • Tara-1044200 (7/28/2010)


    SELECT * INTO REVENUE.DBO.TOTALCK FROM OBBEAVER.REVENUE.DBO.TOTALCK

    I am running the above query on to a table from another server but i see most of the IO on tempdb and also it is growing drastically. I was thinking that the above query will not use tempdb, please explain behind the scene.

    What is growing drastically? TempDB? If so, what has it grown to?

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

  • Tara-1044200 (7/28/2010)


    any idea why this would use temp table?

    Probably due to the settings (like Collation Compatible, Use Remote Collation) you specified on the linked server. Please post an estimated execution plan (I'm expecting a spool) and describe how each of the linked server options are set.

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

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