Loading...
MySQL 9.5 Reference Manual 9.5의 29.12.15 Performance Schema Status Variable Tables의 한국어 번역본입니다.
아래의 경우에 피드백에서 신고해주신다면 반영하겠습니다.
감사합니다 :)
MySQL server는 동작에 대한 정보를 제공하는 많은 status variable을 유지합니다(참조: Section 7.1.10, “Server Status Variables”). Status variable 정보는 다음 Performance Schema table에서 사용할 수 있습니다:
global_status: Global status
variable. Global 값만 필요한 애플리케이션은 이 table을 사용해야 합니다.
session_status: 현재 session에 대한
status variable. 자신의 session에 대한 모든 status variable 값을
원하는 애플리케이션은 이 table을 사용해야 합니다. 이 table에는 해당
session의 session variable뿐만 아니라 session에 대응하는 값이 없는
global variable의 값도 포함됩니다.
status_by_thread: 각 active session에
대한 session status variable. 특정 session에 대한 session variable 값을
알고자 하는 애플리케이션은 이 table을 사용해야 합니다. 이 table에는
thread ID로 식별되는 session variable만 포함됩니다.
또한 account, host name, user name별로 집계된 status variable 정보를 제공하는 summary table도 있습니다. 참조: Section 29.12.20.12, “Status Variable Summary Tables”.
Session variable table(
session_status,
status_by_thread)은 종료된
session이 아니라 active session에 대한 정보만 포함합니다.
Performance Schema는
threads table에서
INSTRUMENTED 값이 YES인 thread에 대해서만
global status variable의 통계를 수집합니다. Session status variable에 대한
통계는 INSTRUMENTED 값과 관계없이 항상 수집됩니다.
Performance Schema는 status variable table에서
Com_xxx status
variable에 대한 통계를 수집하지 않습니다. Global 및 session별 statement 실행
횟수를 얻으려면
events_statements_summary_global_by_event_name
table과
events_statements_summary_by_thread_by_event_name
table을 각각 사용하십시오. 예를 들면 다음과 같습니다:
1SELECT EVENT_NAME, COUNT_STAR 2FROM performance_schema.events_statements_summary_global_by_event_name 3WHERE EVENT_NAME LIKE 'statement/sql/%';
global_status 및
session_status table에는 다음과
같은 column이 있습니다:
VARIABLE_NAMEStatus variable 이름입니다.
VARIABLE_VALUEStatus variable 값입니다.
global_status의 경우 이 column에는
global 값이 들어 있습니다.
session_status의 경우 이 column에는
현재 session에 대한 variable 값이 들어 있습니다.
global_status 및
session_status table에는 다음과
같은 index가 있습니다:
VARIABLE_NAME)에 대한 primary keystatus_by_thread table에는 각
active thread의 status가 들어 있습니다. 이 table에는 다음과 같은 column이
있습니다:
THREAD_IDStatus variable이 정의된 session의 thread identifier입니다.
VARIABLE_NAMEStatus variable 이름입니다.
VARIABLE_VALUETHREAD_ID column에 의해 명명된 session에 대한
session variable 값입니다.
status_by_thread table에는 다음과
같은 index가 있습니다:
THREAD_ID,
VARIABLE_NAME)에 대한 primary keystatus_by_thread table에는
foreground thread에 대한 status variable 정보만 포함됩니다.
performance_schema_max_thread_instances
system variable이 autoscale되지 않는 경우(값이 −1로 표시됨)이고,
허용되는 instrumented thread object의 최대 개수가 background thread 개수보다
크지 않으면 table은 비어 있습니다.
Performance Schema는 status variable table에 대해 다음과 같이
TRUNCATE TABLE을 지원합니다:
global_status: Thread, account, host,
user status를 리셋합니다. Server가 절대 리셋하지 않는 status variable을
제외한 global status variable을 리셋합니다.
session_status: 지원되지 않습니다.
status_by_thread: 모든 thread에 대한
status를 global status 및 account status로 집계한 다음 thread status를
리셋합니다. Account 통계가 수집되지 않는 경우, session status는 host 및
user status에 추가되며, host 및 user status가 수집되는 경우에만
추가됩니다.
다음 system variable이 각각 0으로 설정되어 있으면 account, host, user 통계는
수집되지 않습니다:
performance_schema_accounts_size,
performance_schema_hosts_size,
및
performance_schema_users_size
system variable입니다.
FLUSH STATUS는 모든 active session의
session status를 global status variable에 추가하고, 모든 active session의
status를 리셋하며, 연결이 끊어진 session으로부터 집계된 account, host, user
status 값을 리셋합니다.
29.12.14 Performance Schema System Variable Tables
29.12.16 Performance Schema Thread Pool Tables