AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

top (데이터베이스 명령)

top

top is an administrative command that returns usage statistics for each collection. You can use top metrics to compare the relative performance of your collections against each other.

중요

The top command must be run against a mongod instance. Running top against a mongos instance returns an error.

For every collection, top returns the amount of time, in microseconds, that each event takes to execute and a count of how many times each event has executed. The time and count metrics reset only after you restart your mongod instance.

Queryable Encryption 사용하는 경우 top 명령은 컬렉션 이름만 반환합니다.

이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

Issue the top command against the admin database:

db.runCommand(
{
top: 1
}
)

The top command returns usage statistics for the following event fields:

필드
설명

total

모든 readLock 및 writeLock 작업의 조합입니다.

readLock

읽기 잠금을 사용하는 작업에 대한 사용량 통계입니다. 이러한 작업에는 쿼리 및 집계가 포함되지만 이에 국한되지는 않습니다.

writeLock

쓰기 잠금을 사용하는 작업에 대한 사용량 통계입니다. 이러한 작업에는 문서 삽입, 업데이트 및 제거가 포함되지만 이에 국한되지는 않습니다.

queries

쿼리 작업에 대한 사용 통계 (예: find) queries.time 및 queries.count 필드 또한 readLock.time을(를) 업데이트하고 readLock.count을(를) 증가시킵니다.

getmore

getMore 작업에 대한 사용 통계입니다.

insert

insert 작업에 대한 사용 통계입니다. insert.time 및 insert.count 필드 또한 writeLock.time을(를) 업데이트하고 writeLock.count을(를) 증가시킵니다.

update

update 작업에 대한 사용 통계입니다. update.time 및 update.count 필드 또한 writeLock.time을(를) 업데이트하고 writeLock.count을(를) 증가시킵니다.

remove

delete 작업에 대한 사용 통계입니다. remove.time 및 remove.count 필드 또한 writeLock.time을(를) 업데이트하고 writeLock.count을(를) 증가시킵니다.

commands

집계, 인덱스 생성, 인덱스 제거 등의 작업에 대한 사용 통계입니다. 명령 유형에 따라 commands.time 및 commands.count 필드는 writeLock 필드 또는 readLock 필드를 업데이트합니다.

예를 들어 집계 작업은 readLock.time와(과) readLock.count을(를) 증가시킵니다. 인덱스 생성은 writeLock.time 및 writeLock.count씩 증가시킵니다.

The output of the top command resembles the following output:

{
"totals" : {
note: "all times in microseconds",
"records.users" : {
"total" : {
"time" : 305277,
"count" : 2825
},
"readLock" : {
"time" : 305264,
"count" : 2824
},
"writeLock" : {
"time" : 13,
"count" : 1
},
"queries" : {
"time" : 305264,
"count" : 2824
},
"getmore" : {
"time" : 0,
"count" : 0
},
"insert" : {
"time" : 0,
"count" : 0
},
"update" : {
"time" : 0,
"count" : 0
},
"remove" : {
"time" : 0,
"count" : 0
},
"commands" : {
"time" : 0,
"count" : 0
}
}
}