On 23 Jan 2013, at 9:01am, Pierre Chatelier <k...@club-internet.fr> wrote:
> [what I do not understand] > I perform a computer cold boot, launch my app, opens a doc, perform the > query. The sqlite3_step() takes some time (a few seconds).It's ok, the > query is rather complex. > Now, I close my doc, reopens it. The same query performs very fast. > I close my app, restart it, open the doc, perform the query, and one > again it goes very fast. > I stop the computer, restart it, redo the above, and that time, the > query is slow. What you describe is typical of a computer with a slow hard disk and lots of file cache space. The first time a file is needed it has to be read from hard disk which is slow. After that the data is already in (cache) memory and access to that is fast. Operating systems these days do not expect to see the computer rebooted even once a week, so slowing the computer up only after a reboot isn't a problem. There is one complicating factor under Windows which is that Windows makes special efforts to cache files with certain extensions on the filename. And these actually make sqlite slower. So pick a file extension for your databases which is something obviously unusual (.sqlite, .s, etc..) rather than one which Windows may think it understands (.db). However I don't think that this is anything to do with the problem you're reporting. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users