> In my experience, SQLite doesn't eliminate such redundant clauses, nor
> remove trivial conditions (like 1=1 or 1 != 0), nor shortcircuit
> logical
> operations, nor hoist common subexpressions (those that don't depend on
> the current row) out of the loop. An expression is translated into VDBE
> program in a very literal manner.

Thank you for the heads up. I'm going to have to plan to rewrite our SQL 
generation for the major version, as some of our SQL statements are becoming 
very long and at least half of that can be taken out.

> I suspect that any inefficiency introduced by that will be immeasurably
> small. But, if in doubt, test it.

Not sure how to test it exactly at the moment, but in any case, if there's any 
inefficiency and we're doing 200K+ lookups with that small inefficiency, it may 
become measurable :)

Best regards,

   Dennis

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

Reply via email to