In message <[email protected]>, Allen Egerton
<[email protected]> writes
Martin Phillips wrote:
Hi Allen,
If I know in advance that I'm adding a large number of records
to a file, is there any way to force the file to "grow" in advance?
You could do this with the MINIMUM.MODULUS parameter but the whole point
of dynamic files is that they do their own tuning. Although a dynamic
file is unlikely to be as good as a perfectly tuned static file, it will
be a lot better than a typical static file that has been left alone for
a long while.
Another important point is that a split affects only one (or arguably
two) groups unlike resizing a static file from modulo N to modulo N+1
which would affect every group.
My real point here is that it is usually best to let a dynamic file look
after itself.
In general I'd agree with you.
The situation is that I'm potentially adding a million records to a
dynamic file. That's not hypothetical, it's a real life scenario. And
I don't want to wait while the file splits multiple times over the
course of the add. I don't have that large a window. I want to force
the file to expand the weekend before so that when I add the records the
file isn't rebuilding.
Just taken a look at the manual. Use CONFIGURE.FILE to change the
parameters of a dynamic file, including MINIMUM.MODULUS. Note that
RESIZE will apparently object to (or ignore) MIMIMUM.MODULUS if the file
starts off as a dynamic file.
I'd just try changing the minimum modulus and seeing if it really does
what it says. If it doesn't actually increase the modulus, try doing a
RESIZE * * * and see if that adds the extra groups.
Bearing in mind, however, that resizing a file is normally pretty fast,
why aren't you happy letting it do its own thing? The only thing to
watch out for is if something locks the file and prevents resizing, like
doing a BASIC SELECT. I've come across files that were 120% or so full
...
In fact, if you felt that the impact of overflow was less than that of
splitting (say the file is growing by less than 100%), you could simply
do ED FILENAME * to disable splitting while you're adding all these
records. The file will then gradually put itself right as it's updated
later.
Cheers,
Wol
--
Anthony W. Youngman <[email protected]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/