none
How to shrink my table? RRS feed

  • Question

  • Ladies & gentleman,

    I'm the former president.My name is Zerobamɑ.

    I've a big table with a clob column.

    Now I want to shrink my table for improving query speed, but the clob column can't be shrinked.

    If you provide me any solutions, I'll appoint you to be the leader of Marine Corps.

    By the way, if Terlangpu try to prevent you, I'll....Sorry, I have no any idea for you


    • Edited by 0bamɑ Thursday, May 4, 2017 1:51 AM
    • Moved by Shanky_621MVP Thursday, May 4, 2017 4:44 AM posting unnecessary things
    Thursday, May 4, 2017 1:49 AM

All replies

  • One option would be to create an index with included columns for what you need in your query.  (Not the CLOB column, of course...)

    Then you'd run your queries without the CLOB column, only pulling that down once you need it.  However, this would have an impact on the time it takes to modify data in your table, as there's more information that needs to be kept up to date.

    Another, better option would be to move the CLOB column out to a separate table, and only join to/query it when you need the CLOB.


    • Edited by Erik H. Bakke Thursday, May 4, 2017 2:21 AM Better explanations.
    Thursday, May 4, 2017 1:52 AM
  • Now I want to shrink my table

    I don't understand what you mean with "shrink my table"? If you think you have to much data in the table, then delete data.

    Or do you mean Data Compression? Keep in mind it's only available in Enterprise Edition.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, May 4, 2017 3:45 AM
  • Stop being smart on forum you are not likely to get the answer by posting crap on forum. If you stick to SQL Server we are very happy to help

    Cheers,

    Shashank

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My TechNet Wiki Articles

    MVP

    Thursday, May 4, 2017 4:45 AM
  • Yeah, it's data compression.
    Thursday, May 4, 2017 6:02 AM
  • And where is the issue then?

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, May 4, 2017 7:41 AM
  • The clob type column can not be compressed.
    Thursday, May 4, 2017 8:01 AM
  • You can compress them, tehre is not limitation on it, see Enable Compression on a Table or Index => Limitations and Restrictions

    But if the column contains already compress data like JPG Pictures, the compression ratio will be 0%


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, May 4, 2017 11:05 AM