This problem can be remedied by defragging the hard disk from time to time. Copying the whole db file might also do. But I'm thinking if it's possible to prevent this problem from happening, or reduce the chances of getting fragmented? Sqlite can use free pages that were originally occupied by deleted records. So it might be able to implement a command to pre-allocate some pages in a big chunk? Requesting a big chunk of hard disk usually get less fragments.
Thanks, Jack -----Original Message----- From: Dennis Jenkins [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 13, 2005 11:39 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Pre-allocating disk space to avoid db file fragments Jay Sprenkle wrote: >On 9/13/05, Dennis Jenkins <[EMAIL PROTECTED]> wrote: > > >>Actually, you can defrag the database file yourself, if you have admin >>rights (b/c you need to open a handle to the physical device). >> >> >> >> >I thought he needed an automated solution to include in his code >released to users. > > > Yeah. His code can defrag the file if it has the correct permissions and is running on Windows NT 4 or better. He can do this whenever he has the need to. Am I missing something? Maybe I missed the original goal and only focused on the "need to defrag" angle.