Re:Speeding up SQL queries by orders of magnitude using UNION
by tech2 on Saturday March 20, 2021 @04:23PM
(#26525833)
Perhaps I'm missing something, but why is query 2's meal_items a left join when the where clause then forces it to act as if it were an inner join? Would changing that have any impact?
[ Parent
| on HN ]
Re:Speeding up SQL queries by orders of magnitude using UNION
by Albert_Camus on Saturday March 20, 2021 @06:42PM
(#26526611)
Author here, you are indeed correct that Query #2's final join can be an INNER join. However, I just tested it against our test data set and it makes no impact on the performance.