mongo DB index
생성
db.collection.ensureIndex( { a: 1, b: 1 }, { unique: true } )
db.collection.ensureIndex( { a: 1, b: 1 }, { unique: true ,background : true} )
삭제
db.collection.dropIndex({a:1,b:1})
이 기사는 저작권자의 CC BY 4.0 라이센스를 따릅니다.
생성
db.collection.ensureIndex( { a: 1, b: 1 }, { unique: true } )
db.collection.ensureIndex( { a: 1, b: 1 }, { unique: true ,background : true} )
삭제
db.collection.dropIndex({a:1,b:1})