Freesunny Freesunny

  • 검색하기 폼

'collection'에 해당되는 글 2건

mongodb 에서 인덱스 용량 확인

해당 DB 의 컬렉션별 인덱스 용량을 각각 표시하는 방법db.getCollectionNames().forEach(function(collection) { let stats = db[collection].stats(); print(collection + " index size: " + (stats.totalIndexSize / (1024 * 1024)).toFixed(2) + " MB");}); 해당 DB 의 컬력션별 인덱스 용량을 합산하여 표시하는 방법let totalIndexSize = 0;db.getCollectionNames().forEach(function(collection) { let stats = db[collection].stats(); totalIndexSize += stats.t..

mongoDB | 2024. 9. 21. 13:02

mongoDB collection 별 용량 확인하는 방법

방법#1 : mongosh에서는 SQL 스타일의 명령어를 사용하여 데이터베이스 내의 컬렉션 목록을 쉽게 확인할 수 있습니다.이 명령어는 현재 선택된 데이터베이스의 컬렉션 목록을 출력합니다.> use myDatabase> show collectionsusersproductsorders 방법#2 : mongosh에서 JavaScript 메서드를 사용하여 컬렉션 목록을 조회할 수도 있습니다.이 명령어는 현재 선택된 데이터베이스의 컬렉션 이름을 배열로 반환합니다.> use myDatabase> db.getCollectionNames()[ "users", "products", "orders"] mongosh에서 db.collection.stats() 메서드를 사용하여 컬렉션의 통계 정보를 확인할 수 있습니다..

mongoDB | 2024. 6. 27. 16:30

Prev 1 Next

CATEGORIES

  • 분류 전체보기 (68)
    • AWS (19)
    • CentOS (4)
    • Docker (4)
    • Grafana (1)
    • haproxy (1)
    • Kubernetes (12)
    • Linux (2)
    • mongoDB (5)
    • MySQL-MariaDB (1)
    • Prometheus (0)
    • Python (3)
    • Ubuntu (6)
    • Redis (3)
    • Web (1)
    • XenServer (2)
    • Zabbix (4)

NOTICE

MORE

RECENT POST

RECENT COMMENT

ARCHIVE

CALENDAR

«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

TAGS

  • zabbix
  • docker
  • redis
  • XenServer
  • collection
  • prometheus
  • systemctl
  • Boto3
  • centos7
  • docker-compose
  • describe-addresses
  • uuid
  • MongoDB
  • Zabbix 4
  • kubectl
  • Zabbix Agent 4
  • AWS
  • Centos 7
  • Linux
  • aws-list-all
  • k8s
  • AWSCLI
  • kubernetes
  • Python
  • Zabbix 4 Agent
  • ubuntu
  • Zabbix Agent
  • eks
  • ubuntu 18.04
  • JQ

LINKS

COUNTER

Total :

Yesterday : | Today :

태그 방명록 관리자

Blog is powered by kakao / Designed by nOo9ya

티스토리툴바