mongodb slow query 조회
2022. 11. 1. 11:37ㆍPost
생각해보게 한 글 : https://tech.inflab.com/202201-event-postmortem/
참고 :
(계정권한 생성) https://devel-lee.tistory.com/18
(Oracle, MS-SQL, Mysql, postgreSQL의 slow query 조회 방법) https://dreamcoding.tistory.com/62
(db.setProfilingLevel 공식문서) https://www.mongodb.com/docs/manual/reference/method/db.setProfilingLevel/
(SQL Profiler를 이럴때 쓰는구나) https://rockplace.tistory.com/m/233
개념 :
slow query란 무엇인가?
DBMS 가 client로부터 요청받은 query를 수행할 때 일정 시간 이상 수행되지 못한 query
SQL Profiler: DB 활동을 검사하고 해당 DB를 대상으로 실행한 SQL 명령에 대한 보고서를 생성합니다. 이 보고서를 참조해 오래 수행되는 SQL을 식별해 개선하거나, 자주 사용하는 SQL 명령을 추적할 수 있는 기능
준비물 :
mongodb로 붙어 아래 명령어를 실행할 권한이 있는 계정, mongosh 가 설치 되어있는 환경(혹은 다른 클라이언트),
db.currentOp({“secs_running”: {$gte: 3}})
'Post' 카테고리의 다른 글
| python 테스트 프레임워크 (1) | 2022.11.08 |
|---|---|
| 한 컴퓨터에서 git 여러 계정 + 스택오버플로우 (4) | 2022.11.07 |
| mongosh 조회 (0) | 2022.09.28 |
| git | 이미 origin 에 push 한 커밋 메시지 수정 (1) | 2022.09.27 |
| What is pip's equivalent of `npm install package --save-dev`? (0) | 2022.09.23 |