Getting resource exhausted using a JOIN

:question:Let’s say you have a JOIN query like this:

SELECT FerroAnalytics.event, FerroAnalytics.lunch.favBobaShops,
FROM commons.FerroAnalytics
JOIN shops on FerroAnalytics.lunch.favBobaShops = boba_shops._id

:no_entry: All of a sudden you get a Resource Exhausted on the console.

:white_check_mark: One easy optimization step you can take is to make sure that the larger table is on the left side of the join.

If you’re still getting resource exhausted, and this answer didn’t help, respond to in a thread!