On Fri, Sep 20, 2019 at 12:33 PM Hick Gunter <h...@scigames.at> wrote:
> The dialogue from the stackoverflow discussion shows this quite clearly. > Shows what clearly Gunter? I'm not sure to follow. I've read the SO post, and I don't get your point. We can observe GROUP BY works ASCending only as of now. Why it can't work DESCending to avoid ordering, that's a different question. From https://www.sqlite.org/lang_select.html we can observe that GROUP BY takes an expr on the RHS, while ORDER BY takes an expr followed by optional COLLATE and ASC/DESC terms. So given an GROUP BY expr followed by an ORDER BY with the same expr, "pushing up" the ordering's COLLATE and ASC/DESC terms on the GROUP BY itself, eliminates the need for the separate ordering step. That's a clear win in runtime performance. Hopefully SQLite can do that sooner rather than later. Thanks, --DD _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users