On 25 Mar 2012, at 8:44pm, Neo Anderson <neo_in_mat...@msn.com> wrote:

> It's just that the two resultsets are not related. What I thought was that I 
> could gain some performance by combining two SELECT into one statement and 
> execute it via one prepare/step.

Ah.  Now we understand.  No, you can't.  Almost all the work that SQLite puts 
into executing a SELECT is related to the data it finds.  There's very little 
overhead generated just because you're executing a command.  So you don't save 
much by combining those two commands into one.  Execute them as two separate 
commands, either using _prepare() or _exec() as you see fit.

Similarly, you're not saving much time using such a compact representation as

>> select 1 a

Measure the amount of time saved: on a recent computer it's mere microseconds.  
You might as well use normal full syntax, and be able to understand your code 
when you read it in a few years' time.

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

Reply via email to