Getting resource exhausted using a JOIN

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

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

: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!