host_summary_by_statement_type and x$host_summary_by_statement_type Sys Schema Views

You are viewing an old version of this article. View the current version here.
MariaDB starting with 10.6

These Sys Schema views were introduced in MariaDB 10.6

Description

The host_summary_by_statement_type and x$host_summary_by_statement_type views summarize information about executed statements, grouped by host and statement type. Rows are sorted by host and descending total latency by default.

The host_summary_by_statement_type view is intended to be easier for human reading, while the x$host_summary_by_statement_type view provides the data in raw form, intended for tools that process the data.

They contain the following columns:

ColumnDescription
hostHost that the client connected from, or background for background threads (where the HOST column in the underlying Performance Schema table is NULL).
statementFinal component of the statement event name, for example create_table or select.
totalTotal number of statement occurrences for the host.
total_latencyTotal wait time of timed statements of the statement event for the host.
max_latencyMaximum single wait time of timed occurrences of the statement event for the host.
lock_latencyTotal time spent by timed occurrences of the statement event for the host waiting for locks.
rows_sentTotal number of rows returned by occurrences of the statement event for the host.
rows_examinedTotal number of rows read from storage engines by occurrences of the statement event for the host.
rows_affectedTotal number of rows affected by occurrences of the statement event for the host.
full_scansTotal number of full table scans by occurrences of the statement event for the host.

Example

SELECT * FROM sys.host_summary_by_statement_type\G
*************************** 1. row ***************************
         host: localhost
    statement: create_table
        total: 18
total_latency: 366.93 ms
  max_latency: 48.02 ms
 lock_latency: 3.16 ms
    rows_sent: 0
rows_examined: 0
rows_affected: 0
   full_scans: 0
*************************** 2. row ***************************
         host: localhost
    statement: select
        total: 27
total_latency: 339.16 ms
  max_latency: 64.51 ms
 lock_latency: 205.61 ms
    rows_sent: 750599937895926
rows_examined: 13925
rows_affected: 0
   full_scans: 21

...

SELECT * FROM sys.x$host_summary_by_statement_type\G
*************************** 1. row ***************************
         host: localhost
    statement: create_table
        total: 18
total_latency: 366927804000
  max_latency: 48023563000
 lock_latency: 3156000000
    rows_sent: 0
rows_examined: 0
rows_affected: 0
   full_scans: 0
*************************** 2. row ***************************
         host: localhost
    statement: select
        total: 28
total_latency: 343873182000
  max_latency: 64507216000
 lock_latency: 205984000000
    rows_sent: 750678474440767
rows_examined: 14370
rows_affected: 0
   full_scans: 22

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.