Lock statistics


Job details

Name: Lock statistics
Platform: Mysql
Category: Performance
Description: Collects lock statistics
Long description: This task collects lock data statistics
Version: 2.11
Default schedule: 55,25 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & is_mysql_branch=‘1′]/.[hasengine=‘YES’ & global_status_performance_schema = ‘1′ ]

Parameters

Name Default value Description
keep data for 7 The number of days to keep the data for.

Job Summary

SELECT * FROM dbw_lock_statistics_table_histr ORDER BY histr_date DESC
SELECT * FROM dbw_lock_statistics_row_histr ORDER BY histr_date DESC
SELECT * FROM dbw_lock_statistics_last

Job Details

The job is part of the dbWatch Control Center toolkit, specifically in the ‘mysql_lock_statistics’ group. Once executed, the job collects the statistics and stores them into three different tables:

Should execution fail, the job is configured to perform a cleanup – it will drop all three tables, along with the procedure dbw_lock_statistics.

Report

The job also generates a report titled ‘Lock statistics’, which includes individual presentations for table lock statistics and row lock statistics. These presentations include dual-axis charts to represent the history of locks immediately acquired and locks waited for, as well as the number of times the server had to wait for row locks and the time it spent waiting.

The report can be manually generated by querying the historical tables (dbw_lock_statistics_table_histr and dbw_lock_statistics_row_histr), but these queries are also executed as part of the job and results are displayed in the report.