Hi Richard,

Do you have a plan to implement "common subexpression elimination" ?

In the attached database, when I try to execute "select * from 
v_category_display", performances are very bad and I don't know how to correct 
this problem.

"common subexpression elimination" is the best solution for me.

Thank you in advance for your help.

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

Reply via email to