Remove old records in mongodb based on Month

后端 未结 5 1179
[愿得一人]
[愿得一人] 2020-12-30 04:13

I am trying to delete Older records present in my collection .

I have a collection named \"user_track\" , which consists of data in this format shown below

5条回答
  •  死守一世寂寞
    2020-12-30 04:38

    In addition to other answers you may be interesting in the "Time to live” collection feature: http://docs.mongodb.org/manual/tutorial/expire-data/

    It's useful to automatically expire/remove documents from a collection after specific period of time.

提交回复
热议问题