Session History
This screen allows you to view session information collected during the query period in chronological order. You can analyze which sessions executed which SQL at specific times, and what the status and resource usage of each session was.
-
Data is provided based on active session snapshots collected at 5-second intervals.
-
The Session Trend chart allows you to visually track changes in session count over time.
-
Use the field panel and filters to query only sessions that meet specific conditions.
Querying Session History
Set query conditions in the top filter, filter sessions using the field panel, then check session changes and status over time through the session trend chart and list.
Basic Options
You can set time, target instance, and filters in the top filter area.
-
Time: Select the query time range; set to 10-minute intervals by default, and you can move with left/right arrows
-
Instance: Select the DB instance to query
-
Filter: Add conditions per field to filter data; AND logic is applied for multiple conditions
-
View Mode: Switch between table view and tree view
-
Download: Export in CSV format
Field Panel
You can easily add filter conditions from the Field panel on the left side of the screen.
-
Click a field name in the Field panel to display a condition input popup for that field.
-
Set the operator and value, then click the Apply button to add the condition to the top filter.
-
You can search for field names using the search bar at the top. Click the
button next to Filter to display only sessions that meet the conditions in the chart and table.
- For example, if you set the
queryfield to contain "sale", only sessions with SQL statements containing "sale" are queried. When multiple conditions are applied, AND logic is used.
- For example, if you set the
Session Trend Chart
Displays the number of active sessions and lock wait sessions during the query period as a bar chart. The X-axis is time and the Y-axis is the number of sessions. You can query up to 1 hour at a time.
- Among all active sessions, lock wait sessions are displayed in red.
- You can visually identify the total number of active sessions and the proportion of lock wait sessions at specific time periods.
- Drag the chart area to drill down into that interval for detailed analysis.
- Click a specific time on the chart to display only the active sessions for that time period in the table below.
Session List Table
Displays collected session information in chronological order. You can navigate pages using the pagination at the bottom, and you can set the number of items displayed per page.
Column Guide
The supported environment for each column indicates the conditions under which data for that column can be queried.
-
MySQL: Collected from the join result of
performance_schema.threadsandinformation_schema.processlist. Only available when the monitoring target is MySQL. -
MariaDB: Collected from
information_schema.processlist. Only available when the monitoring target is MariaDB. -
MySQL, MariaDB: Columns available in both databases.
-
XOS: Can only be queried when the XOS agent is additionally installed.
-
Common: Always available regardless of the DB type or agent installation status.
Basic Information
| Column | Description | Supported Environment |
|---|---|---|
time | Time when session information was collected | Common |
instance | DB instance name | Common |
id | Session (process) ID | MySQL, MariaDB |
user | Connected user name | MySQL, MariaDB |
host | Connected host address | MySQL, MariaDB |
db | Database name in use | MySQL, MariaDB |
Execution Information
| Column | Description | Supported Environment |
|---|---|---|
command | Currently executing command type (Query, Sleep, Daemon, etc.) | MySQL, MariaDB |
runtime | Execution time of the current command (seconds) | MySQL, MariaDB |
state | Current session status (executing, Waiting for, etc.) | MySQL, MariaDB |
query | SQL statement being executed | MySQL, MariaDB |
query_param | Bind parameter values of the SQL | Common |
query_hash | SQL hash value | Common |
query_id | Query ID | MariaDB |
Thread and Process
| Column | Description | Supported Environment |
|---|---|---|
os_id | OS-level thread ID | MySQL |
thread_id | MySQL internal thread ID | MySQL |
tid | Thread ID | MariaDB |
type | Thread type | MySQL |
name | Thread name | MySQL |
connection_type | Connection type | MySQL |
Execution Stage
| Column | Description | Supported Environment |
|---|---|---|
stage | Current execution stage | MariaDB |
max_stage | Total number of execution stages | MariaDB |
progress | Progress of the current stage | MariaDB |
time_ms | Execution time (milliseconds) | MariaDB |
Resource Usage
| Column | Description | Supported Environment |
|---|---|---|
cpuusage | CPU usage | XOS |
cputime | CPU usage time | XOS |
memory_used | Memory usage | MariaDB |
max_memory_used | Maximum memory usage | MariaDB |
rss | Resident Set Size (physical memory usage) | XOS |
pss | Proportional Set Size (proportional memory usage) | XOS |
vsize | Virtual memory size | XOS |
I/O and Row Processing
| Column | Description | Supported Environment |
|---|---|---|
ioread | I/O read amount | XOS |
iowrite | I/O write amount | XOS |
examined_rows | Number of rows examined | MariaDB |
Data Interpretation Guide
Key Checkpoints
| Column | Meaning | Interpretation |
|---|---|---|
command | Session command type | Query: Executing SQL, Sleep: Idle state, Daemon: Background process |
runtime | Execution time of the current command | Higher values indicate long-running sessions → Possible lock contention or inefficient query |
state | Current session status | Waiting on...: Waiting state → Check for lock or I/O wait causes |
examined_rows | Number of rows examined | Higher values indicate inefficient scan → Index review needed |
cpuusage | CPU usage | High values indicate CPU-intensive query → Query optimization needed |
Identifying Abnormal Sessions
-
Sessions with abnormally high
runtime: Long-running sessions → Check for lock contention, slow queries, incomplete transactions -
Multiple sessions with
statein Waiting: Contention for a specific resource → Analyze lock causes -
Sessions with
commandas Sleep and longruntime: Idle connection maintained for extended time → Review connection pool settings -
Sessions with high
examined_rowsandstateas executing: Large-scale scan in progress → Review indexes, tune query
Practical Use Scenarios
Scenario 1. Analyzing a Sudden Session Spike at a Specific Time
-
Check the interval where the session count spikes in the session trend chart
-
Check
commandandstatein the session list for that time period -
Analyze whether the same
queryrepeats or if requests are concentrated from a specifichost -
Use filters to classify sessions by
stateorcommand
Scenario 2. Tracking Long-Running Sessions
-
Add a
runtimefilter in the field panel to query long-running sessions -
Check the
queryof that session to identify which SQL has been running for a long time -
Check the
stateto determine if the query is executing or waiting for a lock -
If necessary, check the execution plan (Plan) of that SQL
Scenario 3. Analyzing Sessions by Specific User or Host
-
Add a
userorhostfilter in the field panel -
Check the session pattern of that user/host
-
Analyze whether there are abnormally many sessions or long-running queries
Scenario 4. Analyzing Lock Contention Causes
-
Add a
statefilter in the field panel to query sessions in Waiting state -
Check the
queryanddbof waiting sessions -
Identify sessions accessing the same table or resource
-
Check if sessions with long
runtimeare holding locks
Additional Features
Using Filters
-
Click the filter add area or click a field name in the field panel.
-
Select a filter key.
-
String:
=(contains),!=(does not contain) -
Number:
==(equals),>=(greater than or equal to),<=(less than or equal to)
-
-
Enter a value and apply.
-
Apply AND logic for multiple conditions.
Table Column Settings
You can add/remove columns to display and change the order by dragging through the column selection feature in the table header.