At 02:10 22/07/2006, you wrote:
Michael,
The guy who produced Sqlitespy is a member of this forum so he can
confirm or debunk my theory as to why you are getting a big
difference in execution time. I suspect that Sqlitespy might be
storing the SQL in its compiled (from sqlite3_prepare) form and when
you run it you skip the compile phase. It is hard to imagine that
compile optimization makes a fourfold difference in executions
speed, particularly to a well written program like Sqlite.
Sorry, but i must disagree. He uses VC6, a compiler from
pre-alot-of-processor-advances. So, the compiler can't, not only
compile for a more modern and different processor (different
pipeline, sse, new processor modes, etc..) but also use old libraries
that were made for older processors. For example, in Delphi 6 (if i
remember well) code written in pascal run faster than assembly
optimized libraries, but written for 386!!!. In powerpc area (what i
know), using altivec libraries, boost sort code up to x16,
memory2memory copy, assign, move, etc... up to x4 and so on, but if
you use a compiler from pre-altivec era or non altivec optimized
libraries (including libc), your code will be a lot slower.
We do a similar thing in our Sqlite applications, compile the SQL
when the program loads then use the compiled VDBE code as input to ....
unnecessarily.
I agree with you here.
-------------------------------------------------------------------------------------------------------------------------------------------------
Antivirus. Warning: Usuario detectado. Por favor retirese del
ordenador o sera ud. eliminado. Gracias