To Insert rows into a Compressed table..

  • Hello,

    I compressed a table XYZ in Sql Server 2008. Now i need to insert some thousands of rows from another table ABC into XYZ.

    Insert into XYZ

    select * from ABC.

    As the table is compressed, the rows which we are inserting will be non compressed.

    How to insert rows with compressed state.

    Please reply.

    Thanks,

    SK

  • There shouldn't be anything special for you to do. SQL Server will compress the data as necessary as it performs the inserts. It manages all the compression so that it's transparent to DML operations.


    And then again, I might be wrong ...
    David Webb

  • There is a CPU overhead with compression, since your inserting thousands of rows , make sure you take this into account. other than this there is nothin special needed to insert rows.

    Are you using page level compression ?

    Jayanth Kurup[/url]

  • Same syntax as an insert into a table that is not compressed. The CPU cost is minimal.

    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

  • Jayanth_Kurup (7/23/2012)


    There is a CPU overhead with compression, since your inserting thousands of rows , make sure you take this into account. other than this there is nothin special needed to insert rows.

    Are you using page level compression ?

    There'll likely be a huge I\O overhead too

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

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

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