sort 등을 위해 사용되는 memory resource 사용 상태 check 방법 문의 글쓴이 : 포로리 날짜 : 2016-09-07 (수) 14:44 조회 : 8513 BI시스템에 사용되는 DW용도로 사용 중입니다. 최근 화면의 지연이 많이 되어 EDB에서의 지연이 있는지 check 중입니다. 대량의 table에서 sort가 발생되는 경우 이 쿼의의 sort가 memory에서 수행이 되었는지, Disk(temp)에서 수행이 되었는지 확인을 하려고 하는데, sort 영역의 memory resource를 어떻게 모니터링 해야 하나요? 댓글목록 PostgresDBA 2016-09-08 (목) 09:15 expaln analyze 로 보는게 정확합니다. performance_test=# explain analyze select * from users order by userid; Sort (cost=352825.84..355325.84 rows=1000000 width=219) (actual time=1601.031..2033.621 rows=1000000 loops=1) Sort Key: userid Sort Method: external merge Disk: 225872kB <------------------- 디스크 소팅 -> Seq Scan on users (cost=0.00..41250.00 rows=1000000 width=219) (actual time=0.477..225.933 rows=1000000 loops=1) Planning time: 0.298 ms Execution time: 2170.056 ms (6 rows) expaln analyze 로 보는게 정확합니다. performance_test=# explain analyze select * from users order by userid; Sort (cost=352825.84..355325.84 rows=1000000 width=219) (actual time=1601.031..2033.621 rows=1000000 loops=1) Sort Key: userid Sort Method: external merge Disk: 225872kB <------------------- 디스크 소팅 -> Seq Scan on users (cost=0.00..41250.00 rows=1000000 width=219) (actual time=0.477..225.933 rows=1000000 loops=1) Planning time: 0.298 ms Execution time: 2170.056 ms (6 rows) 포로리 2016-11-01 (화) 14:25 자세한 설명 감사합니다. 모니터링을 하려고 하는 이유는 ETL 등의 batch application의 resource 사용량을 확인하기 위해서 였는데, 조금 더 찾아 보겠습니다. 자세한 설명 감사합니다. 모니터링을 하려고 하는 이유는 ETL 등의 batch application의 resource 사용량을 확인하기 위해서 였는데, 조금 더 찾아 보겠습니다. Vacuum 2016-11-12 (토) 01:18 postgresql 파라미터 중 log_temp_files를 설정하시면 temporary file을 쓰는 SQL을 확인하는데에 도움이 되실 것 같네요... log_line_prefix에 설정이 같이 되어 있다면 IP,app_name등 같이 볼 수 있어서 도움이 되지 않을까 싶습니다... https://www.postgresql.org/docs/9.5/static/runtime-config-logging.html postgresql 파라미터 중 log_temp_files를 설정하시면 temporary file을 쓰는 SQL을 확인하는데에 도움이 되실 것 같네요... log_line_prefix에 설정이 같이 되어 있다면 IP,app_name등 같이 볼 수 있어서 도움이 되지 않을까 싶습니다... https://www.postgresql.org/docs/9.5/static/runtime-config-logging.html PostgresDBA 2016-11-12 (토) 08:58 이방법이 더 깔끔하겠네요! 이방법이 더 깔끔하겠네요!
PostgresDBA 2016-09-08 (목) 09:15 expaln analyze 로 보는게 정확합니다. performance_test=# explain analyze select * from users order by userid; Sort (cost=352825.84..355325.84 rows=1000000 width=219) (actual time=1601.031..2033.621 rows=1000000 loops=1) Sort Key: userid Sort Method: external merge Disk: 225872kB <------------------- 디스크 소팅 -> Seq Scan on users (cost=0.00..41250.00 rows=1000000 width=219) (actual time=0.477..225.933 rows=1000000 loops=1) Planning time: 0.298 ms Execution time: 2170.056 ms (6 rows) expaln analyze 로 보는게 정확합니다. performance_test=# explain analyze select * from users order by userid; Sort (cost=352825.84..355325.84 rows=1000000 width=219) (actual time=1601.031..2033.621 rows=1000000 loops=1) Sort Key: userid Sort Method: external merge Disk: 225872kB <------------------- 디스크 소팅 -> Seq Scan on users (cost=0.00..41250.00 rows=1000000 width=219) (actual time=0.477..225.933 rows=1000000 loops=1) Planning time: 0.298 ms Execution time: 2170.056 ms (6 rows)
포로리 2016-11-01 (화) 14:25 자세한 설명 감사합니다. 모니터링을 하려고 하는 이유는 ETL 등의 batch application의 resource 사용량을 확인하기 위해서 였는데, 조금 더 찾아 보겠습니다. 자세한 설명 감사합니다. 모니터링을 하려고 하는 이유는 ETL 등의 batch application의 resource 사용량을 확인하기 위해서 였는데, 조금 더 찾아 보겠습니다.
Vacuum 2016-11-12 (토) 01:18 postgresql 파라미터 중 log_temp_files를 설정하시면 temporary file을 쓰는 SQL을 확인하는데에 도움이 되실 것 같네요... log_line_prefix에 설정이 같이 되어 있다면 IP,app_name등 같이 볼 수 있어서 도움이 되지 않을까 싶습니다... https://www.postgresql.org/docs/9.5/static/runtime-config-logging.html postgresql 파라미터 중 log_temp_files를 설정하시면 temporary file을 쓰는 SQL을 확인하는데에 도움이 되실 것 같네요... log_line_prefix에 설정이 같이 되어 있다면 IP,app_name등 같이 볼 수 있어서 도움이 되지 않을까 싶습니다... https://www.postgresql.org/docs/9.5/static/runtime-config-logging.html