중요
Mongo쉬 방법
This page documents a mongosh method. This is not the documentation for database commands or language-specific drivers, such as Node.js.
이 데이터베이스 명령에 대해 알아보려면 collStats 명령에 의해 반환되는 size 필드를 참조하세요.
MongoDB API 드라이버의 경우 언어별 MongoDB 드라이버 설명서를 참조하세요.
정의
db.collection.dataSize()반환합니다: 컬렉션의 크기(바이트)입니다.
Data compression이 값에 영향을 주지 않습니다.복제본 세트 노드에서 실행하는 경우
collStats연산을 수행하려면 노드가PRIMARY또는SECONDARY상태여야 합니다. 노드가STARTUP2와 같은 다른 상태이면 연산 오류가 발생합니다.
호환성
이 메서드는 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
참고
This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전