File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,14 @@ finite amount of time.
31
31
Create a TTL Index
32
32
------------------
33
33
34
+ .. warning::
35
+
36
+ After you create a TTL index, it might have a very large number of
37
+ qualifying documents to delete at once. This large workload might
38
+ cause performance issues on the server. To avoid these issues, plan
39
+ to create the index during off hours, or delete qualifying documents
40
+ in batches before you create the index for future documents.
41
+
34
42
To create a TTL index, use the :method:`~db.collection.createIndex()`
35
43
method on a field whose value is either a :ref:`date
36
44
<document-bson-type-date>` or an array that contains date values, then specify the ``expireAfterSeconds`` option with the desired TTL value in
You can’t perform that action at this time.
0 commit comments