Home » Databases » Sybase » ASE » Sybase ASE: reorg ‘with time’ and resume explained

Sybase ASE: reorg ‘with time’ and resume explained

When we perform the reorg with the “with time=30”, the reorg will run for 30 minutes and then stop – no notification is performed (this would be an incomplete reorg).  This can become a problem:

week 1: 

reorg compact big_table with time=30,resume

reorg completes 20% of the table

week 2:

reorg compact big_table with time=30,resume

reorg completes 20% of the table BUT from 20% – 40%

week 3:

reorg compact big_table with time=30,resume

reorg completes 20% of the table BUT from 40% – 60%

Not only will it take several weeks for the reorg to complete, there were probably changes in the 0-20%, 20-40% ranges that won’t be touched by the reorg until we loop back around.

If we drop the ‘resume’, we are even worse off.  We would be performing the reorg on the first 0-20% of the table each week.  The 20-100% would never be touched by the reorg.

Preferrably, we want the reorg to run to completion, but if this is not possible, we set the time to such a value where it can be balanced.

One thing to keep in mind is that the “with time=” is not the maximum time allotted for the reorg to run, it is the length of time it will run.  That means, for smaller tables, once we finish the reorg, it will loop and perform the reorg again and again until the time is reached.  Yeah, it is a brain-dead feature that I’m raising with Sybase  (see Reorg ‘with time=’ – counter intuitive).

Share Button

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect