1
0
Fork 0

mention howto use indices for joins (#3229)

This commit is contained in:
Wilfried Goesgens 2017-09-13 17:45:45 +02:00 committed by Frank Celler
parent a03a86fe46
commit eb221d97e6
1 changed files with 10 additions and 0 deletions

View File

@ -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 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. 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 ### Pitfalls
Since we're free of schemata, there is by default no way to tell the format of the Since we're free of schemata, there is by default no way to tell the format of the