Eberhard, Markus (external)
<markus.eberhard.exter...@eads.com> wrote:
> I'm using SQLite in my application and I would like to fetch the whole
> result set of a select statement to memory.
> I can't use sqlite3_get_table since it doesn't support BLOBs as far
> as I know.
> Currently I'm using function sqlite3_step to itterate through the
> result set; that function calls winRead (->ReadFile) which consumes
> between 60% and 70% of the application runtime (thousands of winRead
> calls). That is why I'm searching for a possibility to fetch the
> whole result set of a select statement to memory. Is there any
> possibility to do that?

Let me get this straight. The data is originally in a file on disk. You 
want it in memory. But you don't want the application to make any 
ReadFile calls. How precisely do you expect the bits to get from here to 
there?

sqlite3_get_table is implemented simply by looping with sqlite3_step - 
look at its source code. You can do the same, and save each row in some 
in-memory data structure. I don't see though how you expect any of this 
to reduce disk activity.

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to