4 ms·
One of the reasons why SQL is crap: there should be no distinction between the two in relational algebra. A set of {A, B, C, B, C} is the same as {A, B, C}.
by jhgb 4y ago
One of the reasons why SQL is crap: there should be no distinction between the two in relational algebra. A set of {A, B, C, B, C} is the same as {A, B, C}.
- ttfkam 4y agoDetecting duplicates has a cost you can't just hand-wave away. UNION ALL tells the engine not to worry about it and just output as it sees it, usually going faster. Depends on your data needs.
- jhgb 4y agoAnd not treating relationships as sets has costs of its own -- for example it breaks relational formula equivalences that could be used for query optimization.
- intelijstupide 4y ago
- SnowHill9902 4y agoFor some definitions of same as.