mongodb以background方式建立索引

来源:互联网 发布:四川网络教育学校 编辑:程序博客网 时间:2024/05/16 11:38

Background Construction

For potentially long running index building operations, consider the background operation so that the MongoDB database remains available during the index building operation. For example, to create an index in the background of the zipcode field of the people collection, issue the following:

db.people.createIndex( { zipcode: 1}, {background: true} )
0 0
原创粉丝点击