On 12/11/06, Dennis Cote <[EMAIL PROTECTED]> wrote:

Simply read the entire file once using fread when you open the database.
That will load the entire file in to the OS cache so that when SQLite
starts reading the file, the required disk blocks are already in memory.
The result is the same fast lookups that you see in SQLite the second
time you run a query. The additional read is also quite fast since it
reads the file sequentially from start to finish with no seeking,
whereas SQLite will seek back and forth as it reads database pages into
memory.

You probably can't fseek() to the end and get the same effect?

You could do this in vb6 by writing a loop and using "input #1"
and discarding what was read. In vb.net it's much simpler using
a file stream reader.

--
The JS Image Collector suite:
http://groups-beta.google.com/group/js-image-collector?hl=en

SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com

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

Reply via email to