On 14 Sep 2017, at 8:02pm, Clemens Ladisch <clem...@ladisch.de> wrote:

> Jens Alfke wrote:
>> can someone please tell me how to hoist/factor out the subexpression 
>> manually then?
> 
> Move the subexpression into a subquery, then prevent subquery flattening
> (http://www.sqlite.org/optoverview.html#flattening) by violating one of
> the listed constraints.  (These rules might change in the future ...)
> 
> In this case, let's use rule 7: the subquery does not have a FROM clause:
> 
>   SELECT x, x FROM (SELECT slow(10) AS x);

Nice.  Assuming it works, which it looks like it should.

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

Reply via email to