Skip to content

Commit af25316

Browse files
committed
Edited synopsis
1 parent 1e30060 commit af25316

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

draft/core/indexes.txt

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,37 @@ Index Overview
77
Synopsis
88
--------
99

10-
Indexes are an internal representation of the documents in your
11-
database organized so that MongoDB can use them to quickly locate
12-
documents and fulfill queries very efficiently. Fundamentally, indexes
10+
An index is a data structure that allows you to quickly locate documents
11+
based on the values stored in certain specified fields. Fundamentally, indexes
1312
in MongoDB are similar to indexes in other database systems. MongoDB
1413
supports indexes on any field or sub-field contained in documents
1514
within a MongoDB collection. Consider the following core features of
1615
indexes:
1716

1817
- MongoDB defines indexes on a per-:term:`collection` level.
1918

20-
- Every query (including update operations,) can use one and only one
21-
index. The query optimizer determines, empirically, the best query
22-
plan and indexes to use on a specific query, but can be overridden
23-
using the :func:`cursor.hint()` method. However, :ref:`compound
24-
indexes <index-type-compound>` make it possible to include multiple
25-
fields in a single index.
26-
2719
- Indexes often dramatically increase the performance of queries;
2820
however, each index creates a slight overhead for every write
2921
operation.
3022

23+
- Every query (including update operations) use one and only one
24+
index. The query optimizer determines which index to use
25+
empirically, by occasionally running multiple query plans,
26+
and tracking the most performant index for each query type.
27+
The query optimizer's choice can be overridden
28+
using the :func:`cursor.hint()` method.
29+
30+
- Indexes can be created over a single field, or multiple fields using a
31+
:ref:`compound index <index-type-compound>`.
32+
3133
- Queries that are "covered" by the index return more quickly
32-
than documents that have to scan many individual documents.
34+
than queries that have to scan many individual documents. An index is
35+
considered to "cover" a query if all the data that the query must return
36+
is stored in within the keys of the index.
3337

34-
- By using queries with good index coverage, it possible for MongoDB
35-
to only store the index itself and the most often used documents in
36-
memory, which can maximize database capacity, performance and
37-
throughput.
38+
- Using queries with good index coverage will reduce the number of full
39+
documents that MongoDB needs to store in memory, thus maximizing database
40+
performance and throughput.
3841

3942
Continue reading for a complete overview of indexes in MongoDB,
4043
including the :ref:`types of indexes <index-types>`, basic

0 commit comments

Comments
 (0)