Subject | Re: why does restore last so long?? |
---|---|
Author | Ali Gökçen |
Post date | 2005-07-15T14:54:41Z |
I guess he has a lot of duplacated indexes.
FB losts itself while building that indexes (especially FKs).
He can see this state when restore in verbose to screen mode.
I have databases around 1.5 GB with 250 tables and 600 indexes
but they takes under half an hour to restore.
If your fbk and fdb files are on the same disk,
you need read from backup then write it to db.
It makes DISK arm crazy.
Reading of 2 GB file takes about 100 seconds at 20 MB/sec read speed,
writing of 1.2 GB file takes about 60 seconds at 20 MB/sec write
speed approximately in theorically.
You need minimum 3 minutes to copying the file without any
calculation and re-read. But building indexes need too much re-read
and writes.
Regards.
Ali
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
FB losts itself while building that indexes (especially FKs).
He can see this state when restore in verbose to screen mode.
I have databases around 1.5 GB with 250 tables and 600 indexes
but they takes under half an hour to restore.
If your fbk and fdb files are on the same disk,
you need read from backup then write it to db.
It makes DISK arm crazy.
Reading of 2 GB file takes about 100 seconds at 20 MB/sec read speed,
writing of 1.2 GB file takes about 60 seconds at 20 MB/sec write
speed approximately in theorically.
You need minimum 3 minutes to copying the file without any
calculation and re-read. But building indexes need too much re-read
and writes.
Regards.
Ali
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 02:56 PM 15/07/2005 +0200, you wrote:1.0 and I
> >Hi!
> >My database has about 1.2 GB and I made a backup with firebird
> >was trying to restore it with firebird 1.5engine
> >Is it normal that restore can last more than 2 hours?? Usage of
> >processor during that process is between 10-20 % - so what does
> >do during that time?retrieves the
> >does any one know?
>
> Yes. :-=)
>
> Restore literally rebuilds your database from scratch. It
> metadata first and recreates all of the objects. It requestschunks of
> disk space ("pages") as required, and builds the page inventory asit
> goes. When all of the metadata is in place, it then reads thedata into
> the newly created structures, applying the constraints as itA
> goes. Finally, it activates all of the indexes and builds them.
> restored database is squeaky clean.indexes
>
> I must say I've never had a restore of a 1.2 Gb database take 2
> hours. More like 2 minutes. But I don't generally have a lot of
> and I keep very lean keys on my tables...perhaps you have a lot ofindexes
> and/or a lot of dependencies involving composite keys...I'll
>
> Restore is very disk-intensive. Is your disk very slow, or very
> fragmented, or both? When my restores start looking a bit slow,
> schedule a disk defrag. I reserve my 7200 rpm disks fordatabases, too. I
> hadn't realised what a difference disk speed made to performanceuntil I
> replaced some 5200 disks recently...
>
> BTW, I've found great benefit from running the Windows defrag tool
> TWICE. And defrags are much faster on a 7200 disk, as well.
>
> ./heLen