Re: Sequences and long files
- Posted by Irv <irv at ELLIJAY.COM> May 06, 1998
- 670 views
At 09:13 AM 5/7/98 +-900, Michael J. Sabal wrote: >---------------------- Information from the mail header ----------------------- >Sender: Euphoria Programming for MS-DOS <EUPHORIA at >MIAMIU.ACS.MUOHIO.EDU> >Poster: Michael Sabal <mjs at OSA.ATT.NE.JP> >Subject: Sequences and long files >------------------------------------------------------------------------------- > >A couple weeks ago, someone posted a question about how to handle = >super-huge database files <snip> , changes would be kept in = >the second database file, a much smaller file whose access time is = >miniscule. Then, during an idle time like waiting for user input, copy = >the changes file into the main database file and save the whole thing. = >This means adding a time check in the wait_for_input routine for like 3 = >minutes, but only if the change file exists. > >Hence, variable length records, mostly rapid access time, and not too = >difficult to program, I would think. This idea would work. There is a difficulty with this, however. If something goes wrong before or while the sequence is written to disk, you've lost a LOT of data. Writing one record at a time sort of cuts down on the damage you can do. There's also the problem of Euphoria's native sequence format: a 300 meg data file would probably take 2 or 3 times that much disk space. If s = {"Now is the time",123}, -- 20 bytes more or less -- it takes 63 bytes to store on disk with a print(fn,s) Irv