포스트

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})

[출처] 인덱스 작성자 June
이 기사는 저작권자의 CC BY 4.0 라이센스를 따릅니다.