Talk shop and learn about MySQL and occasionally some other stores!
Topics and RecordingsLearn From Previous Discussions!
How to JoinSome simple setup help!
Hello everybody!
Join in #DBHangOps this Thursday, April, 02, 2015 at 11:00am pacific (19:00 GMT), to participate in the discussion about:
PERFORMANCE_SCHEMA
You can check out the event page at https://plus.google.com/events/chc1fg244bbts8jp7r84eg1i3hg on Thursday to participate.
As always, you can still watch the #DBHangOps twitter search, the @DBHangOps twitter feed, or this blog post to get a link for the google hangout on Thursday!
See all of you on Thursday!
You can catch a livestream at:
PERFORMANCE_SCHEMA
PERFORMANCE_SCHEMA
is a new database that was introduced in MySQL 5.5
setup_
are used to enable/disable different instrumentssetup_instruments
will determine what's enabled/disabled for monitoring in the serverSHOW PROCESSLIST
-- e.g. preparing tmp table, etc.SHOW...
statements, DELETE...
statements, etc.
statement/sql/...
instruments actually track the text of queries while statement/com/...
tracks counts/latencies of those statement typesstatement/sql/...
instruments actually track the text of queries while statement/com/...
tracks counts/latencies of those statement typesevents_waits_
and events_statements_
tables. For most of these prefixes, there's a summary table and a per-event/per-statement tableNO_INDEX_USED
and NO_GOOD_INDEX_USED
field which indicates if a index wasn't used to satisfy the query vs. not having an index available to satisfy some joins in a queryevents_statements_current
to see performance inforamtion about queries that are actively running on a server (specifically, last statement from active threads)events_statements_summary_by_digest
events_statements_current
, but the records are rolled up by the DIGEST_TEXT
fieldSELECT * FROM events_statements_summary_by_digest ORDER BY sum_timer_wait LIMIT 5\G
could be used to find statements that are spending a lot of wait time for example.table_io_waits_summary_by_table
will provide table-level information about IO waitsSELECT object_schema, object_name, count_star, sum_time_wait FROM table_io_waits_summary_by_table ORDER BY sum_timer_wait DESC LIMIT 10
would show an ordering of top table IO usage.
table_io_waits_summary_by_table
file_summary_by_instance
-- you could see which physical datafiles are observing the most latencyTRUNCATE
statement against any P_S tables in order to "reset" the data in them.SYS
is another schema that is provided to help simplify interactions with PERFORMANCE_SCHEMA
SYS
has one table (sys_config
), the rest of the objects in SYS
are viewsSYS.sys_config
tableSYS
schema will make things more human readable by leveraging data in PERFORMANCE_SCHEMA
SELECT * FROM sys.statements_with_temp_tables LIMIT 5\G
would give you a list of statements on the server using temporary tables, including statistics about how many temporary tables happen, how often they happen, and so on.schema_table_statistics
collects P_S data about table usage and I/O and presents it in an easily consumable view. You can gauge how much time is spent inserting/updating/reading from a table.PERFORMANCE_SCHEMA
tables in MySQL 5.7+events_transactions_current
-- information about in flight transactions, their isolation levels, and so forth
NESTING_EVENT_*
fieldsglobal_status
and global_variables
-- this is data that status_by_
tables show status counters by a given aggregate
status_by_user
allows you to see all these counters on a per-user basisstatus_by_thread
allows you to see all these counters on a per-connected threadmetadata_locks
-- displays all current metadata locks on the server at a given momentmemory_summary_
tables report information about types of memory interactions, allocations, and high/low watermarks
SYS.memory_global_by_current_bytes
table is an excellent view for looking at thisreplication_
tables collect output from something like SHOW SLAVE STATUS
and stores it in a normalized set of tables
SHOW SLAVE STATUS
command couldn't serve as wellreplication_applier_status_by_worker
displays information about each worker thread for replicationreplication_connection_status
provides information about each IO thread connected for replication (to support multi-master replication)busy_timer
type field in the replication_applier_status_by_worker
so it'll be easier to get information about how busy replication threads are.pstop
- https://github.com/sjmudd/pstop
PERFORMANCE_SCHEMA
and shows a live status of what's happening in a server