Hi, Thank you for the answer.
Do you know if it's planned ? Do you know a workaround? Regards, Stephane Le samedi 4 juin 2011 12:36:47, Richard Hipp a écrit : > 2011/6/3 Stéphane MANKOWSKI <steph...@mankowski.fr> > > > 4-EXPLAIN QUERY PLAN SELECT total, total+1, total+2 FROM v_c > > > > returns: > > SCAN TABLE c (~74 rows) > > EXECUTE CORRELATED SCALAR SUBQUERY 1 > > SEARCH TABLE a USING INDEX a_r_a_id (r_a_id=?) (~88 rows) > > EXECUTE CORRELATED SCALAR SUBQUERY 2 > > SEARCH TABLE a USING INDEX a_r_a_id (r_a_id=?) (~88 rows) > > EXECUTE CORRELATED SCALAR SUBQUERY 3 > > SEARCH TABLE a USING INDEX a_r_a_id (r_a_id=?) (~88 rows) > > > > For me this is not optimized (but I am not a db specialist) because the > > computation of "total" is done 3 times instead of only one. > > SQLite does not currently implement common subexpression elimination. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users