logoalt Hacker News

nilamo04/02/20251 replyview on HN

Exactly. Hard to improve on something so great.

We love a

``` select {what} from {where} left join {where} on {how} where {why} ```

A simple query, concisely answering every relevant question, while hiding all of the details of how any of it works. Beautiful.


Replies

kreetx04/04/2025

SQL is a relational algebra language which, unlike imperative languages, is compiled into an execution plan depending on the existence of indexes, table sizes, data types, etc. The reason you should love it is that you don't need to know the details when the data model is set up well. And DBMSs also have commands to view the execution plan, should it have otherwise been slow, such that you know what to do to improve it. It's really not that complicated once you learn how it works.