diff --git a/Documentation/Books/AQL/Examples/Join.md b/Documentation/Books/AQL/Examples/Join.md index e7f6543dbf..a4cd13da29 100644 --- a/Documentation/Books/AQL/Examples/Join.md +++ b/Documentation/Books/AQL/Examples/Join.md @@ -220,6 +220,16 @@ So, for each user we pick the list of their friends and count them. The ones whe count equals zero are the lonely people. Using *RETURN 1* in the subquery saves even more precious CPU cycles and gives the optimizer more alternatives. +### Index usage + +Especially on joins you should [make sure indices can be used to speed up your query.](../../ExecutionAndPerformance/ExplainingQueries.md) +Please note that sparse indices don't qualify for joins: + +In joins you typically would also want to join documents not containing the property +you join with. However sparse indices don't contain references to documents that +don't contain the indexed attributes - thus they would be missing from the join operation. +For that reason you should provide non-sparse indices. + ### Pitfalls Since we're free of schemata, there is by default no way to tell the format of the