Subject Re: GBAK and the -i flag
Author Adam
--- In, Tom Miller
<madprogextrodinr@...> wrote:
> Turning off the indexes during restore makes a big difference during
> restore, but I noticed that the indexes do not get activated after the
> restore is complete. Is their a simple way to do this (after the
> restore is complete) from the command line.

Hi Tom,

You seem to have misunderstood the restore process. A normal restore
creates the tables, fills them with data, and finally creates and
activates the constraints and indices.

All the -i flag does is to skip the last step in the process. There
are only a few times that this is really useful, for example to
recover data from a backup where one of the unique or not null
constraints is somehow violated through corruption. Another example is
when you are intending on using a data pump tool on the restored file
so building the indices is a waste of time.

But the optimisation you are attempting (to hold off the index rebuild
until the end of the restore) is the default behaviour.

There are numerous things that can explain any perceived differences
in speed, from testing errors through to OS caching, hard disk
thrashing (if backup file on same physical disk as database), or other
resource contention such as system load.