How does Cloud Spanner decide which of the available secondary indices to use, or whether to use one at all? Is there documentation on how your query planner works?
Asked
Active
Viewed 83 times
1 Answers
1
Cloud Spanner uses a number of different heuristics to guide index selection, and they may change without warning. If you’re curious which indices a query is using, you should try EXPLAINing the query to see the plan that gets run. If you want to guarantee selection of a particular index, consider using an Index Directive.

willwilson
- 422
- 3
- 8