9
출장 I I 나열된 방법을 사용하여 Capped Collection로 변환 할 필요가 기존의 콜렉션이 있습니다설정 최대는 수집
> db.runCommand({"convertToCapped": "mycoll", size: 100000});
그러나, 최대 필드가 매개 변수
> db.mycol1.convertToCapped
function (bytes) {
if (!bytes) {
throw "have to specify # of bytes";
}
return this._dbCommand({convertToCapped: this._shortName, size: bytes});
}
으로 인정되지 않습니다
어떻게 설정해야할까요?
모든 데이터를 이동하지 않고 컬렉션의 속성을 편집해야하는 것처럼 보입니다. 중간 크기의 ~ 30m 문서 모음에 대해 이야기하고 있으므로 더 직접적인 방법을 선호합니다. – trimbletodd