mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
73 lines
5.6 KiB
Text
73 lines
5.6 KiB
Text
select * from performance_schema.events_statements_current
|
|
where event_name like 'statement/%' limit 1;
|
|
select * from performance_schema.events_statements_current
|
|
where event_name='FOO';
|
|
insert into performance_schema.events_statements_current
|
|
set thread_id='1', event_id=1,
|
|
event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
|
|
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
|
|
update performance_schema.events_statements_current
|
|
set timer_start=12;
|
|
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
|
|
update performance_schema.events_statements_current
|
|
set timer_start=12 where thread_id=0;
|
|
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
|
|
delete from performance_schema.events_statements_current
|
|
where thread_id=1;
|
|
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
|
|
delete from performance_schema.events_statements_current;
|
|
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
|
|
LOCK TABLES performance_schema.events_statements_current READ;
|
|
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
|
|
UNLOCK TABLES;
|
|
LOCK TABLES performance_schema.events_statements_current WRITE;
|
|
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table `performance_schema`.`events_statements_current`
|
|
UNLOCK TABLES;
|
|
#
|
|
# MDEV-25325 column_comment for performance_schema tables
|
|
#
|
|
select column_name, column_comment
|
|
from information_schema.columns
|
|
where table_schema='performance_schema' and table_name='events_statements_current';
|
|
column_name column_comment
|
|
THREAD_ID Thread associated with the event. Together with EVENT_ID uniquely identifies the row.
|
|
EVENT_ID Thread's current event number at the start of the event. Together with THREAD_ID uniquely identifies the row.
|
|
END_EVENT_ID NULL when the event starts, set to the thread's current event number at the end of the event.
|
|
EVENT_NAME Event instrument name and a NAME from the setup_instruments table
|
|
SOURCE Name and line number of the source file containing the instrumented code that produced the event.
|
|
TIMER_START Value in picoseconds when the event timing started or NULL if timing is not collected.
|
|
TIMER_END Value in picoseconds when the event timing ended, or NULL if the event has not ended or timing is not collected.
|
|
TIMER_WAIT Value in picoseconds of the event's duration or NULL if the event has not ended or timing is not collected.
|
|
LOCK_TIME Time in picoseconds spent waiting for locks. The time is calculated in microseconds but stored in picoseconds for compatibility with other timings.
|
|
SQL_TEXT The SQL statement, or NULL if the command is not associated with an SQL statement.
|
|
DIGEST Statement digest.
|
|
DIGEST_TEXT Statement digest text.
|
|
CURRENT_SCHEMA Statement's default database for the statement, or NULL if there was none.
|
|
OBJECT_TYPE NULL for top level statements. The parent statement object type for nested statements (stored programs).
|
|
OBJECT_SCHEMA NULL for top level statements. The parent statement object schema for nested statements (stored programs).
|
|
OBJECT_NAME NULL for top level statements. The parent statement object name for nested statements (stored programs).
|
|
OBJECT_INSTANCE_BEGIN Address in memory of the statement object.
|
|
MYSQL_ERRNO Error code. See MariaDB Error Codes for a full list.
|
|
RETURNED_SQLSTATE The SQLSTATE value.
|
|
MESSAGE_TEXT Statement error message. See MariaDB Error Codes.
|
|
ERRORS 0 if SQLSTATE signifies completion (starting with 00) or warning (01), otherwise 1.
|
|
WARNINGS Number of warnings from the diagnostics area.
|
|
ROWS_AFFECTED Number of rows affected the statement affected.
|
|
ROWS_SENT Number of rows returned.
|
|
ROWS_EXAMINED Number of rows read during the statement's execution.
|
|
CREATED_TMP_DISK_TABLES Number of on-disk temp tables created by the statement.
|
|
CREATED_TMP_TABLES Number of temp tables created by the statement.
|
|
SELECT_FULL_JOIN Number of joins performed by the statement which did not use an index.
|
|
SELECT_FULL_RANGE_JOIN Number of joins performed by the statement which used a range search of the first table.
|
|
SELECT_RANGE Number of joins performed by the statement which used a range of the first table.
|
|
SELECT_RANGE_CHECK Number of joins without keys performed by the statement that check for key usage after each row.
|
|
SELECT_SCAN Number of joins performed by the statement which used a full scan of the first table.
|
|
SORT_MERGE_PASSES Number of merge passes by the sort algorithm performed by the statement. If too high, you may need to increase the sort_buffer_size.
|
|
SORT_RANGE Number of sorts performed by the statement which used a range.
|
|
SORT_ROWS Number of rows sorted by the statement.
|
|
SORT_SCAN Number of sorts performed by the statement which used a full table scan.
|
|
NO_INDEX_USED 0 if the statement performed a table scan with an index, 1 if without an index.
|
|
NO_GOOD_INDEX_USED 0 if a good index was found for the statement, 1 if no good index was found. See the Range checked for each record description in the EXPLAIN article.
|
|
NESTING_EVENT_ID NULL for top level statements. The parent statement event id for nested statements (stored programs).
|
|
NESTING_EVENT_TYPE NULL for top level statements. The parent statement event type for nested statements (stored programs).
|
|
NESTING_EVENT_LEVEL 0 for top level statements. The parent statement level plus 1 for nested statements (stored programs).
|