In my initial message I described some proof-of-concept that I've done.

I downloaded sqlite3.exe (An SQLite command line tool) from the
SQLite's website. I executed my query and I had to wait 4 seconds for
it to complete.

Then I downloaded sqlite3.c, sqlite3.h and shell.c, compiled them
altogether (and got again the command line tool, but now i've built it
by myself using Visual Studio) and executed the same query. It took 15
seconds this time.

I can't understand why.. I set the code optimization level to "max" in
the Visual Studio's Settings.
I also executed in the original (downloaded from sqlite.org)
sqlite3.exe a command:

      pragma compile_options;

and made sure all these options (#defines) were set in my own built of
sqlite3.exe



2012/5/25 Simon Slavin <slav...@bigfraud.org>:
>
> On 24 May 2012, at 8:59pm, Nick <eveningn...@gmail.com> wrote:
>
>> So why does a prebuilt, downloaded from the sqlite website, command
>> line tool takes only 4 seconds, while the same tool, built by me,
>> takes 4 times longer time to execute?
>
> I'm wondering whether the speed increase is related to figuring out the 
> parameters in the command.  Purely out of interest, and not because I know 
> it's faster, have you tried executing the query using sqlite3_exec() rather 
> than _prepare(), _step(), _finalize() ?  Don't do a lot of reworking of your 
> code unless it turns out to be faster.
>
> Simon.
> _______________________________________________
> 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

Reply via email to