Suppose that I have these tables,and example data (the real table I am working on has more columns)
Should I use
join when those tables have billions of records (so efficiency matters) and
- query which city,state,country does the user id=1 lives (Yield 1 row)
- query the name, city, price of a purchase order by price desc limit 100 (Get details on top 100 purchases).
- query the number of the purchases, sum of price of users whose name begins with "Dr"
- query the average spending(sum of price) of users in each city in country "c"