execute count, sqltext 관련 궁금증.. 0 1 2,441

by 호리 [2017.12.08 16:39:14]


dba_hist_sqlstat에서 하루치 snapshot 에 대해서 sql들의 executions_delta를 합하면 

dba_hist_sysstat에서 동일 기간의 execute count를 구하면 executions_delta를 합한 것보다 상당히 큰데

왜 그런지 궁금합니다. 

execute count는 sql 실행 뿐만 아니라 db내부적으로 동작하는 것까지 다 합쳐져서 나오는 건가요?

 

그리고 dba_hist_sqltext를 보면 어떤 거는 프로시저 호출하는 것만 있고, 어떤 거는 프로시저 내부의 sql이 있기도 한데 

그차이는 뭔지도 궁금합니다. 

ex) 

begin procedure_1; end ;

begin procedure_2; end;

select 1 from procedure_2_sql ;

이런 식으로 있더라고요.;;

by 그로밋 [2017.12.13 11:03:08]

오라클 문서를 보면, v$sysstat에서 디비 통계 용어들의 설명이 있읍니다.

https://docs.oracle.com/cd/E11882_01/server.112/e40402/stats002.htm#i375475

User Calls = Number of user calls such as login, parse, fetch, or execute
Recursive Calls = Number of recursive calls generated at both the user and system level

Execute Count = The total number of calls (user and recursive) that execute SQL statements

SQL statement가 실행되고 마치기 까지, 여러 user call들 이 사용됩니다. 

예를 들어, 아주 간단한 select 쿼리라 하더라도, 적어도 parse call, execute call, fetch call 하나씩은 필요하기 때문데, number of user calls이 3이 됩니다.

댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.
로그인 사용자만 댓글을 작성 할 수 있습니다. 로그인, 회원가입