From: Vlad H. <hv...@us...> - 2007-01-26 23:17:41
|
> > > > > #2 I need to ship my database on a CD along with other > > > distributables, > > > > > I need to limit the amount of space "wasted" in the database > > > allocation. > > > > > > > > This is adressed - use "use_all_space" switch in gbak before > put > > > > database on CD > > > > > > I'm sorry but I don't see how "use_all_space" has anything to do > with > > > your proposal. > > > > This was pointed by Dimitry Sibiryakov (in this thread) and was > agreed > > that if "use_all_space" switch is set then database will grow by one > page > > at time > > But this switch only applies to GBAK restore operations. The switch > does not apply to general database operations afterwards. You said above about database which will be placed on CD and must no waste limited CD space. Therefore GBAK restore operation with "use_all_space" switch is very logical way to do it in _all_ FB versions. ... > > > > It have zero performance impact on _allocating space_ (on > windows) > > > but > > > > I expect some benefit from later use of much less fragmented > database > > > > > > But, is not necessary to initialize those pages (write the page > headers) > > > as well? > > > > Not necesary. Content of unused (or orphan if case of crash) pages > > must not have any value for engine as there are no path to read it > > Since the page must not have any value, does this not require the pages > to be initialized/cleared of any data which is present? Why ? Engine will never read content of this pages > After all, the OS will re-allocate old disk space, which will have > garbage data present. > > Further, have you checked the operation of NBackup against your > proposal/private branch? NBackup expects a proper DB page header for > each database page. Good point. NBackup must not read not allocated pages (at least at the tail) - it is waste of time and disk space. Currently NBackup just reads whole database file. I'll look what i can do with it. Simplest way is to track inventory pages while reading db file and take care about bits on a last PIP. To detect last used PIP we can introduce new page flag. Regards, Vlad |