Skip to main content

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.

  1. Click a field name in the Field panel to display a condition input popup for that field.

  2. Set the operator and value, then click the Apply button to add the condition to the top filter.

  3. You can search for field names using the search bar at the top. Click the Search icon button next to Filter to display only sessions that meet the conditions in the chart and table.

    • For example, if you set the query field to contain "sale", only sessions with SQL statements containing "sale" are queried. When multiple conditions are applied, AND logic is used.

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.threads and information_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

ColumnDescriptionSupported Environment
timeTime when session information was collectedCommon
instanceDB instance nameCommon
idSession (process) IDMySQL, MariaDB
userConnected user nameMySQL, MariaDB
hostConnected host addressMySQL, MariaDB
dbDatabase name in useMySQL, MariaDB

Execution Information

ColumnDescriptionSupported Environment
commandCurrently executing command type (Query, Sleep, Daemon, etc.)MySQL, MariaDB
runtimeExecution time of the current command (seconds)MySQL, MariaDB
stateCurrent session status (executing, Waiting for, etc.)MySQL, MariaDB
querySQL statement being executedMySQL, MariaDB
query_paramBind parameter values of the SQLCommon
query_hashSQL hash valueCommon
query_idQuery IDMariaDB

Thread and Process

ColumnDescriptionSupported Environment
os_idOS-level thread IDMySQL
thread_idMySQL internal thread IDMySQL
tidThread IDMariaDB
typeThread typeMySQL
nameThread nameMySQL
connection_typeConnection typeMySQL

Execution Stage

ColumnDescriptionSupported Environment
stageCurrent execution stageMariaDB
max_stageTotal number of execution stagesMariaDB
progressProgress of the current stageMariaDB
time_msExecution time (milliseconds)MariaDB

Resource Usage

ColumnDescriptionSupported Environment
cpuusageCPU usageXOS
cputimeCPU usage timeXOS
memory_usedMemory usageMariaDB
max_memory_usedMaximum memory usageMariaDB
rssResident Set Size (physical memory usage)XOS
pssProportional Set Size (proportional memory usage)XOS
vsizeVirtual memory sizeXOS

I/O and Row Processing

ColumnDescriptionSupported Environment
ioreadI/O read amountXOS
iowriteI/O write amountXOS
examined_rowsNumber of rows examinedMariaDB

Data Interpretation Guide

Key Checkpoints

ColumnMeaningInterpretation
commandSession command typeQuery: Executing SQL, Sleep: Idle state, Daemon: Background process
runtimeExecution time of the current commandHigher values indicate long-running sessions → Possible lock contention or inefficient query
stateCurrent session statusWaiting on...: Waiting state → Check for lock or I/O wait causes
examined_rowsNumber of rows examinedHigher values indicate inefficient scan → Index review needed
cpuusageCPU usageHigh 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 state in Waiting: Contention for a specific resource → Analyze lock causes

  • Sessions with command as Sleep and long runtime: Idle connection maintained for extended time → Review connection pool settings

  • Sessions with high examined_rows and state as executing: Large-scale scan in progress → Review indexes, tune query

Practical Use Scenarios

Scenario 1. Analyzing a Sudden Session Spike at a Specific Time

  1. Check the interval where the session count spikes in the session trend chart

  2. Check command and state in the session list for that time period

  3. Analyze whether the same query repeats or if requests are concentrated from a specific host

  4. Use filters to classify sessions by state or command

Scenario 2. Tracking Long-Running Sessions

  1. Add a runtime filter in the field panel to query long-running sessions

  2. Check the query of that session to identify which SQL has been running for a long time

  3. Check the state to determine if the query is executing or waiting for a lock

  4. If necessary, check the execution plan (Plan) of that SQL

Scenario 3. Analyzing Sessions by Specific User or Host

  1. Add a user or host filter in the field panel

  2. Check the session pattern of that user/host

  3. Analyze whether there are abnormally many sessions or long-running queries

Scenario 4. Analyzing Lock Contention Causes

  1. Add a state filter in the field panel to query sessions in Waiting state

  2. Check the query and db of waiting sessions

  3. Identify sessions accessing the same table or resource

  4. Check if sessions with long runtime are holding locks

Additional Features

Using Filters

  1. Click the filter add area or click a field name in the field panel.

  2. Select a filter key.

    • String: = (contains), != (does not contain)

    • Number: == (equals), >= (greater than or equal to), <= (less than or equal to)

  3. Enter a value and apply.

  4. 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.