List of good tutorials related to MongoDB index
- Optimizing MongoDB Compound Indexes - The "Equality - Sort - Range" (ESR) Rule
- Tips and Tricks for Effective Indexing
- The Sights (and Smells) of a Bad Query
- Tips and Tricks++ for Querying and Indexing MongoDB
- The ESR (Equality, Sort, Range) Rule
- MongoDB Rule for Indexing (Series: 1)
ESR rule summary
- ESR: Equality comes first, then Sort and Range, for example
image from The ESR (Equality, Sort, Range) Rule
- $ne or $nin are range operators, not equality operators
- $regex are range operator
- $in can be an equality operator or a range operator. When $in is used alone, it is an equality operator that does a series of equality matches. $in acts like a range operator when it is used with .sort(). For example
Compound Indexes
- URL: Use Indexes to Sort Query Results — MongoDB Manual
- Sort with a Single Field Index
- Sort on Multiple Fields
- Sort and Index Prefix
Index Cardinality
from e-book "MongoDB: The Definitive Guide: Powerful and Scalable Data Storage"
ไม่มีความคิดเห็น:
แสดงความคิดเห็น