Make game searches do an inner join to gameRatingsSandbox0_mv
#1273
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code was doing a
left join
(aka aleft outer join
) togameRatingsSandbox0_mv
unless$browse
mode is enabled and you're using one of the specified sort orders, in which case it does a simplejoin
(aninner join
).I wrote this code in PR #270, specifically in 3bd2c7a. But… why did I write that? Why didn't I just do an inner join in all cases?
To be quite honest, I can't remember. I bet the issue was that
gameRatingsSandbox0_mv
didn't have exactly as many rows as thegames
table. (And I bet I was misusing$browse
… it probably should have been!$term
.)I believe that
gameRatingsSandbox0_mv
will always have a row for every game in the games table, now that we've merged #1266, and so it should be safe to do an inner join in all cases.