The TTL index (time to live index, which has a life-cycle indexing), which allows you to set a time-out for each document. A document is deleted after it reaches the pre-set aging level. This type of index is useful for caching problems, such as the
The TTL index (time-to-live index) allows you to set a time-out for each document, which is deleted when the document exceeds that time.You can create a TTL index by specifying the EXPIREAFTERSECS option in Ensureindex:>db.foo.ensureindex
The blog has moved Https://www.tianmingxing.com
MongoDB is an open-source, document-oriented NoSQL (not only SQL) database written using C + +, and one of the most popular NoSQL databases. NoSQL Introduction
NoSQL means "Not just SQL", is the
First, the index introductionIn MongoDB, indexes are used to support efficient queries. If there is no index, MONGODB must scan each document in the entire collection to find a matching document. However, if an appropriate index is established,
Environment: Linux: Redhat or CentOS MONGODB installation mode 1: Install MONGODB by configuring Yum, Enterprise Edition and generic version: Not much, just look at the document [root@dominic5 ~]# Ping www.baidu.com PING www.a.shifen.com (180.97.33.7
TTL index:The TTL collection enables MongoDB to set the expiration time for stored data, after a specified period of time, or at a specified point in time, the collection is automatically cleared by Mongod. This feature facilitates the storage of
Original link http://www.cnblogs.com/zhangzili/p/4975080.htmlMongoDB knowledge points at a glance1. Start the MongoDB database:Go to the MongoDB installation directory and execute the following commandC:\Program
1. What is MongoDB?It is a NoSQL database between relational database and non-relational database, written in C + +, is a high-performance document-oriented universal database which integrates agility, scalability and extensibility.2. Why use
1. What is MongoDB?It is a NoSQL database between relational database and non-relational database, written in C + +, is a high-performance document-oriented universal database which integrates agility, scalability and extensibility.2. Why use
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.