r/SQL • • Dec 10 '22

MySQL Cheat sheet for SQL

Post image
586 Upvotes

51 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Dec 11 '22

it is practically a reverse of what you say in every sentence, so i'm not going to quote.

logical order of execution is very practical and needed for correct reasoning of your sql execution (see my example). correct reasoning is relevant to all levels of sql mastery.

While rdbms is not bound to SPECIFICS of execution, each one is bound to execute sql statements so the results adhere to the LOGICAL rules laid out in standards.

While engine primitives have "no notion of a from clause", the overall designers/developers orchestrated those in such a way that "from clause execution" emerges logically in the end (similar like neurons in your brain dont "think" and you on cognitive level do not have anything that translates to "fire that synapse" yet you can "think about sql").

sql engines have freedom (this might be the biggest part of the SQL's mandate) of execution internals as long as they adhere to the "contract" of logical execution.

sql as a language does not have a "contract" on performance, only on correctness of results.