On Thu, Dec 6, 2018 at 12:12 PM Hick Gunter <h...@scigames.at> wrote:
> The cost of the first query plan is therefore O(a * b * (m + log n)) or > O(a *b *m) + O(a * b * log n) > The cost of the second query plan is only O(log n + m * (log a + log b)) > or O((log a*b) * m) + O(log n) > > This makes the second query plan much less costly for IN lists of 2 or > more elements. > Sure. I get that. But how does that relate to CTE? Or carray()? or array-binding? Perhaps there's an opportunity for a better plan in the context of ephemeral tables and/or carray()-wrapped "vtables". But that's a different and separate issue. I guess we each have our own pet-peeves :). --DD _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users