3 ms·
Or SQL: SELECT x*x FROM vector; There's just so many things that SQL got right: - Non-programmers actually read and modify SQL code. I swear, it happens.
by cousin_it 13y ago
Or SQL:
SELECT x*x FROM vector;
There's just so many things that SQL got right:
- Non-programmers actually read and modify SQL code. I swear, it happens. It doesn't happen very much even with Python, and it will never happen with C++.
- It can join multiple data structures in a single query, on arbitrary criteria.
- A query can be optimized as a whole. Optimizers freely reorder the parts and actually come up with good plans.
- The presence or absence of indexes (data structures used for acceleration) is transparent to the query. Can any other language do that?
A lot of the code I've seen would be 10x to 100x smaller if expressed in SQL, or an SQL-like language that can handle nested data structures (which is something that I really want).