Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I know for sure when writing this query that the middle join to mapping_table will map every some_table row to exactly one row (no more, no fewer) in mapping_table.

Your example query joins one some_table row with 1-n rows on mapping table, and another 1-n rows from whatever else is in there to that. If you're expecting a single row in the resulting set per some_table row, it means that you're filtering very hard (which is fine) or that you've a schema problem (which is the actual problem).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: