> On Sep 14, 2017, at 8:38 AM, Warren Young <war...@etr-usa.com> wrote:
> 
> All the examples I’ve seen attempting to support the value of this feature 
> are simple enough that even a naive text compression algorithm could find the 
> similarities and “hoist” the copies so the value is computed only once.  That 
> means the *human* can also see the CSE and hoist it manually.  

Fine; **can someone please tell me how to hoist/factor out the subexpression 
manually then**? My SQL queries are generated procedurally and I can easily 
change my code to do this refactoring, if I know the trick.

I've tried using a "WITH" clause, but it doesn't help; it results in the same 
number of calls to the native function. (See previous post in this thread for 
an actual example.)

I need something that doesn't modify the database, so generating a new table 
with the function results is right out. Even a temporary table wouldn't help 
because it would probably be more overhead than it's worth (the functions I 
want to factor out aren't _that_ expensive.)

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

Reply via email to