I have query that enters into endless loop in update recursive query with UNION ALL, but when I remove ALL from the UNION it's works fine : WITH recursive parentitems(itemid) AS ( VALUES("58f6fb3e-40a0-4b32-90a1-37945c44a649_c476ed54-217a-432a-9857-4fbb1eb5bc7a")
*UNION ALL * SELECT snapshotdata.itemid FROM snapshotdata, parentitems WHERE folder = parentitems.itemid AND ifnull(deleteddate ,99999999999999) = 99999999999999 ) UPDATE snapshotdata SET deleteddate = 20190903142833 WHERE itemid IN parentitems AND backupdate < 20190903142833 AND ifnull(deleteddate,99999999999999) = 99999999999999 As far as I understand ALL in UNION should provide better performance, but somehow it enters into endless loop and eat all computer resources. Thanks _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users