Skip to content

Commit 89996c9

Browse files
authored
(DOCSP-31303): Backport DOCSP-13704 to v4.4. (#3728) (#3855)
* (DOCSP-13704): Added warning about the first TTL index. * (DOCSP-13704): Incorporated Eric's feedback.
1 parent 210ea90 commit 89996c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

source/core/index-ttl.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ of time or at a specific clock time. Data expiration is useful for certain types
2929
like machine generated event data, logs, and session information that
3030
only need to persist in a database for a finite amount of time.
3131

32+
.. warning::
33+
34+
After you create a TTL index, it might have a very large number of
35+
qualifying documents to delete at once. This large workload might
36+
cause performance issues on the server. To avoid these issues, plan
37+
to create the index during off hours, or delete qualifying documents
38+
in batches before you create the index for future documents.
39+
3240
To create a TTL index, use the :method:`~db.collection.createIndex()`
3341
method on a field whose value is either a :ref:`date
3442
<document-bson-type-date>` or an array that contains :ref:`date values

0 commit comments

Comments
 (0)