write to file with quick
Vissers, Wilbert
wilbert.vissers@hp.com
Fri, 17 Sep 2004 14:17:24 +1200
Hi Jari, these options may help, we think from your ref to RMS that you may be working on a Vax, so this is from Michael and I:
Options:
(a) Pre-allocate disc space for the file. The reason being that on a VAX the file may be being continuously extended by the operating system 1 record at a time because that's what quick would be writing. That's what the system administrator could have been seeing.
(b) Write to an indexed file instead of a sequential file, then extract the data part afterwards with a utility or Quiz. Set a simple key to the record number to keep the index clean. The reason for this idea is that indexed files are more normal and there may well be something unusual about what quick needs to do when working with sequential files.
Couldn't resist doing this at lunchtime, so we had a little play and ran some tests on a very slow old machine we have here, for 20,000 records:
(1) Quiz to subfile = 25 seconds
(2) Quick to sequential file = 32 minutes yes minutes
(3) Quick to indexed file = 7 minutes
Quiz code:
----------
ACCESS GL-BATCH
REPORT SUMMARY ALL
SET REPORT LIMIT 20000
SET SUBFILE
GO
Quick code:
-----------
LET WK-COUNT = 0
INFO = "STARTING " + ASCII(SYSTIME,8) NOW RESPONSE
WHILE WK-COUNT < 20000
BEGIN
LET WK-COUNT = WK-COUNT + 1
LET BATCH-KEY OF GL-BATCH = ASCII(WK-COUNT)
PUT GL-BATCH RESET ; <---- DESIGNER FILE
END
INFO="FINISHED " + ASCII(SYSTIME,8) NOW RESPONSE
Hope something in this helps, best regards.
Wilbert