Please, no. A common problem in data warehousing is that a design with lots of foreign keys becomes slow to load. A standard solution is to move the checks for referential integrity elsewhere, then drop the foreign key constraint. This massively improves load performance. This syntax change means that this solution can't be used because you have no idea what random queries out there might rely on the specific existen…
Absolutely agree. Further, whenever someone is adjusting table performance index tweaks is almost always the first thing to tackle. Adding foreign keys into the query is just as bad as adding indexes into the query (which, you can do in T-SQL, but generally shouldn't). Indexes can be dropped, changed, or added and you SHOULD be relying on the SQL optimizer to use the most appropriate index. This feature appears to on…
SQL language proposal: JOIN FOREIGN
121–130 of 206 posts
Re: SQL language proposal: JOIN FOREIGN
#122Re: SQL language proposal: JOIN FOREIGN
#123Is this not something that should be written at the app level rather than dml?
Re: SQL language proposal: JOIN FOREIGN
#124Reducing verboseness is nice, but the main perk is the correctness.
Oh.. if I got a cent every time I found a bug in colleagues sql, because of join accidentally multiplying/doubling rows... :-)
Re: SQL language proposal: JOIN FOREIGN
#125While we are at it let's write SQL queries starting from FROM. `FROM users SELECT *` It'd allow tooling to provide IntelliSense better.
Re: SQL language proposal: JOIN FOREIGN
#126Re: SQL language proposal: JOIN FOREIGN
#127While we are at it let's write SQL queries starting from FROM. `FROM users SELECT *` It'd allow tooling to provide IntelliSense better.
But how the Javascript world ever thought that `import { function } from 'library'` was better than `from 'library' import { function }` I'll never know. Python got this right long before anyone was even thinking about adding imports to JS!
Re: SQL language proposal: JOIN FOREIGN
#128Re: SQL language proposal: JOIN FOREIGN
#129Of all the myriad indignities of SQL, this isn't near the top of my list. I also don't like making the names of objects like foreign keys and indexes first class concerns in your queries, that's a whole new layer of cognitive overhead.
Agree. I'd much prefer they worked on the way MySQL determines what indexes to use on a multi-table join, so there could be less emphasis on the need to ANALYZE TABLE and FORCE INDEX when the DB is seemingly being dumb, but there's not enough information in EXPLAIN to tell you where it's actually getting tripped up. Troubleshooting full table scans on large sets of data is a nightmare.
Re: SQL language proposal: JOIN FOREIGN
#130example: FOREIGN LEFT JOIN