I'm writing a VFS right now. One of the parameters to the open is the file type (various types of DBs and journals). You should be able to use that info. Also, look for a took called config on the sysinternals site. It allows you to pre-allocate contiguous files. Better, it allows you to defrag a single file.

Also, if you are feeling particularly sadistic, you could build a defragger into your open/close routines using the appropriate NTFS IOCTLs. ;-)

Gary Moyer wrote:
Hi Teg,

Isn't an open issued for the database and journal separately?

I'm very familiar with the behavior for read-only, not so much for
read/write...

Regards,
-- Gary


On 10/28/07, Teg <[EMAIL PROTECTED]> wrote:
Hello Gary,

Sunday, October 28, 2007, 4:51:11 PM, you wrote:

GM> Hi Teg,

GM> Have you considered the SQLite VFS?

GM> Regards,
GM> -- Gary


GM> On 10/28/07, Teg <[EMAIL PROTECTED]> wrote:
I'd like to pre-allocate the DB for Sqlite so, I can ensure it's a
contiguous block of space on the disk. I'm aware of the "Insert a
bunch of data then delete" method but, it doesn't ensure a contiguous
block on disk. Is there some way I can allocate a file with OS calls
and
then
use it as an SQLite DB?

C




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]


-----------------------------------------------------------------------------
Tried. One problem is at the VFS level, the code doesn't know if it's
writing to a journal or main DB file. You can pre-allocate in VFS
but, when the journal and main DB are combined, the main DB grows by
journal file size (or so I seem to observe).

This would probably have to be done in the pager.

--
Best regards,
Teg                            mailto:[EMAIL PROTECTED]



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]

-----------------------------------------------------------------------------




Reply via email to