Subject Re: [firebird-support] Re: Gbak utility
Author Ann W. Harrison
paulfirebird@... wrote:
>

>
> All processing is done here, so no backups at clientside.
>
> What I want to deliver to the client is a read-only database with all indices active. I know I can do this in 2 different ways:
> 1: gfix -mo read_only: this has the advantage that it's (almost) instantly done (only change a couple of bits in the file)
> 2: do a backup and restore read-only: This has the advantage of a smaller file for distribution (-25% in our cases), but does take a lot of unnecessary calculation time (2 times index-creation a 6h each).
> Especially because the first time the index is created is the last step in my process, and the next step (create backup) removes them.
>
> For now I've chosen method #1, but it sure would please me if I get #2 working.
>

You could, I guess, create the database with no indexes defined -
preferably from a source that's guaranteed to have unique values
where required and proper foreign key values - back it up; restore
it; create the indexes from a script; then use gfix to make it
read only. That way you create the indexes once and still get as
dense a database as possible. During the restore, don't reserve
space on pages ... I forget what the switch is, but the space is
for back versions and a read-only database doesn't have any.


Good luck,

Ann