Joins
- combine data from different sources
- Join results from multiple collections
- Achieved with FOR loops
All the flights of all airports which LAND in dallas (_to)
FOR airport in airports
FILTER airport.city == "Dallas"
FOR flight in flights
FILTER flight._to == airport._id
RETURN { "airport": airport.name, "flight": flight.FlightNum }
- The problem with these joins is that they can be very costly even if you index your data. Especially on clusters, where networking is included. But it's noramlly fast enough in my experience. (if the data iterations aren't too big)
- If you have performant issue u might want to select the data and process it yourself which might be a faster solution. Especially when you want to use an exact algorithm.