Lock statistics


Job details

Name: Lock statistics
Platform: Mariadb
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_mariadb_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 table_locks_immediate, table_locks_waited FROM dbw_lock_statistics_last;
SELECT row_lock_waits, row_lock_time FROM dbw_lock_statistics_last;

Tables and Stored Procedures Created

Table Name Description
dbw_lock_statistics_table_histr Stores historical data about table locks including immediate and waited locks with the times they were recorded.
dbw_lock_statistics_row_histr Stores historical data about row locks including the number of waits and the time spent waiting with the times they were recorded.
dbw_lock_statistics_last Stores the most recent data about both table and row locks.
Procedure Name Description
dbw_lock_statistics Calculates the lock statistics, updates the latest and historical information tables, and maintains data as per the configured retention policy.

Cleanup and Maintenance Instructions

DROP TABLE dbw_lock_statistics_table_histr;
DROP TABLE dbw_lock_statistics_row_histr;
DROP TABLE dbw_lock_statistics_last;
DROP PROCEDURE dbw_lock_statistics;

Implementation Details

Dependency Checks and Install Conditions

Reporting

This comprehensive setup of the monitoring job in dbWatch Control Center ensures efficient tracking and management of lock statistics relevant to performance optimization and troubleshooting within MariaDB environments.