> For the complete documentation index, see [llms.txt](https://docs.tibero.com/sysmasterdb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tibero.com/sysmasterdb/8.3_manual/realtime/main-monitoring/session-monitoring/session/sql-detail.md). Agents can also search and read this documentation through its [MCP server](https://docs.tibero.com/sysmasterdb/~gitbook/mcp).

# SQL Detail 탭

현재 session에서 수행중인 SQL과 동일한 SQL의 과거 수행 이력 및 통계를 보여준다.

## SQL 수행 과거 이력 기한 선택

현재 session에서 수행 중인 SQL과 동일한 SQL이 과거에 수행되었던 이력을 조회하기 위하여, 원하는 기간을 선택하여 조회할 수 있다.

## SQL Full Text

현재 session에서 수행 중인 SQL 전문을 보여준다.

<figure><img src="https://content.gitbook.com/content/KFJJxDLiLb7KYeF0CGyF/blobs/9KADP6mCKO5igMS51eTZ/image.png" alt=""><figcaption></figcaption></figure>

## Plan Tree

현재 session에서 수행 중인 SQL에 대한 Plan을 확인할 수 있는 화면이다. 이때 SQL Plan을 Tree 구조로 보여준다.

<figure><img src="https://content.gitbook.com/content/KFJJxDLiLb7KYeF0CGyF/blobs/IMPXyASOl73PUpeVY9n7/image.png" alt=""><figcaption></figcaption></figure>

## SQL 수행 이력 통계

현재 수행 중인 SQL과 동일한 SQL들의 과거 이력들의 통계 정보를 보여준다. Summary, execute count, physical reads, logical reads, plan history, sql trace 항목들을 보여준다.

### Summary

Summary 탭 화면에서는 분석 구간 동안 stat 지표 및 wait event 리스트와 각 wait event별 wait time의 값을 확인할 수 있다.

<figure><img src="https://content.gitbook.com/content/KFJJxDLiLb7KYeF0CGyF/blobs/sNTm9WuSGqfqrloBY7qI/image.png" alt=""><figcaption></figcaption></figure>

| 항목         | 설명                                                      |
| ---------- | ------------------------------------------------------- |
| Statistics | Statistics 지표 확인                                        |
| Wait Class | 분석 구간 동안의 wait class 목록과 각 wait class별 wait time의 값을 확인 |
| Wait Event | Wait class에서 선택한 항목에 대한 상세 내역을 확인                       |

### Execute count

Execute Count 탭 화면에서는 시간 단위별 Execute Count를 차트 형태로 확인할 수 있다.

<figure><img src="https://content.gitbook.com/content/KFJJxDLiLb7KYeF0CGyF/blobs/60THrbtLlX0apianAbod/image.png" alt=""><figcaption></figcaption></figure>

### Physical Reads

Physical Reads 탭 화면에서는 시간 단위별 Physical Reads를 차트 형태로 확인할 수 있다.

### Logical Reads

Logical Reads 탭 화면에서는 1분 단위의 Logical Reads를 차트 형태로 확인할 수 있다.

<figure><img src="https://content.gitbook.com/content/KFJJxDLiLb7KYeF0CGyF/blobs/iG08TFginlx7tmYsYNje/image.png" alt=""><figcaption></figcaption></figure>

### Plan History

Plan History 탭 화면에서는 같은 쿼리에 대해 Plan별 비교가 가능하다.

<figure><img src="https://content.gitbook.com/content/KFJJxDLiLb7KYeF0CGyF/blobs/z3ZeZhMxuEFpuUrx9pTn/image.png" alt=""><figcaption></figcaption></figure>

### SQL Trace

SQL Trace 탭 화면에서는 조회 기간 동안의 SQL 수행 이력(Trace 정보)을 확인할 수 있다.

<figure><img src="https://content.gitbook.com/content/KFJJxDLiLb7KYeF0CGyF/blobs/UaWvxuihkkDggI70XJy3/image.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**참고**

SQL 수행 이력 수집에 사용하는 티베로 라이브러리 이슈로 일부 정보에 Machine, Module, Program, Username, OS User 항목이 수집되지 않을 수 있다.

SQL trace 의 child number 가 0 인 경우는 다양한 이유로 SQL plan 할당에 실패 했을 경우이다. 그리고 SQL plan 생성을 실패하는 지점까지 수행 시간 자체가 사용자가 설정한 SQL\_STAT\_HISTORY\_THRESHOLD 가 넘으면 SQL plan 생성을 실패한 SQL trace 를 수집하게 된다. 결론적으로 수집된 SQL trace 의 child number 가 0 인 경우 매핑되는 SQL plan 이 없으므로 SQL plan 을 볼 수 없다.
{% endhint %}

###
