On Tue, 05 Mar 2019 13:58:06 -0700 "Keith Medcalf" <[email protected]> wrote:
> >The query requests no such thing. SQL makes no request or > >suggestion for how to execute a query. It simply describes a result. > >It's up to the implementation to determine how to produce that > >result. > > You are, of course, correct. However for the two queries given I do > not believe that any query planner currently in existence will > recognize that t1.c == 1 and t2.c == 1 implies that t1.c == t2.c. Thank you for the clarification, Keith. You may well be right about the state of the art. I fault SQL itself; if it implemented relational algebra correctly, there would be no duplicates from SELECT, and no need of DISTINCT. Perhaps then the transformation of FORALL to JOIN would be easier to infer. There is sometimes a tendency in this forum to use shorthand, to describe what SQLite does as what SQL does. It's useful for the users' sake to distinguish between the two, so as not to confuse the attainable with the attained. :-) --jkl _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

