Informix

nested-group-icon.png

DB2

Expand all | Collapse all

Table and index rebuild

  • 1.  Table and index rebuild

    Posted Wed September 16, 2020 12:36 PM
    Hi,

    I am having some fragmentation problems due to changes in some tables fields an indexes, as I have some system constraints and the only way to identify that I know is through dbschema, I do an export and import to optimize.
    Is there any way to optimize the process?

    Thanks for any help,

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------


  • 2.  RE: Table and index rebuild

    Posted Wed September 16, 2020 03:13 PM
    What version of the engine are you running. In 11.7 and newer you should be able to use the storage optimization routines in sysadmin.

    ------------------------------
    TOM GIRSCH
    ------------------------------



  • 3.  RE: Table and index rebuild

    Posted Wed September 16, 2020 05:28 PM
    Hi Tom,

    Thanks for reply, I am using versions from 11.70 to 14.10 but I am facing some performance problems, even using sysadmin tasks...

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 4.  RE: Table and index rebuild

    Posted Wed September 16, 2020 10:24 PM
    If fragmentation is really the issue, a table rebuild shouldn't fare any better than a "table defragment"; If repack->shrink->defragment doesn't solve your performance issue, I don't think a table rebuild will either.

    ------------------------------
    TOM GIRSCH
    ------------------------------



  • 5.  RE: Table and index rebuild

    Posted Thu September 17, 2020 04:19 AM
    Maybe I am missing something for the proccess,is it enough activate auto_crsd? There is any other task that can help me?
    Concerning I have several instances with sysdistrib stress, this can be related?

    SP

    ------------------------------
    Sergio Peres
    AIRC
    Coimbra
    ------------------------------



  • 6.  RE: Table and index rebuild

    Posted Thu September 17, 2020 10:57 AM
    Perhaps it's not able to keep up. I'd try running it manually against one of the impacted tables to see how long it takes and whether it completes.

    ------------------------------
    TOM GIRSCH
    ------------------------------