Chiming in a thought, but isn't there a subtle difference between the two? As I am reading Toms post, sqlite3_prepare would be called once and the parameters would be bound up to 384 times
The call to sqlite3_exec should finalize the prepared query and re-prepare it 384 times. I would expect that sqlite3_prepare would be faster in such a case, and maybe Toms is pointing out a circumstance where recreating the query seems to be faster. Or am I misreading the post? John John Stanton wrote: > Sqlite3_exec just encapsulates sqlite3_prepare. You very likely have > something wrong with your code if yor version works slower. > > toms wrote: > >> Hi all >> I tried to use the sqlite3_prepare to increase my performances during >> requests for both writing / reading. >> The strange thing is that when using prepare on a request used many >> times with many parameters (many times = 384 max, many parameters = 15) >> it os slower than simply using the sqlite3_exec. >> Did I miss something? >> Should I be aware of some tricks about prepare? >> Many thanks >> toms >> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users