Difference between revisions of "MariaDB slow queries"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
[[/var/log/mysql/mariadb-slow.log]] | [[/var/log/mysql/mariadb-slow.log]] | ||
[[systemctl restart mariadb]] && [[systemctl status mariadb]] | [[systemctl restart mariadb]] && [[systemctl status mariadb]] | ||
+ | |||
+ | |||
+ | # Enable the slow query log to see queries with especially long duration | ||
+ | slow_query_log_file = [[/var/log/mysql/mariadb-slow.log]] | ||
+ | long_query_time = 10 | ||
+ | log_slow_rate_limit = 1000 | ||
+ | log_slow_verbosity = query_plan | ||
+ | log-queries-not-using-indexes | ||
== Related == | == Related == |
Revision as of 05:06, 23 September 2022
/etc/mysql/mariadb.conf.d/50-server.cnf /var/log/mysql/mariadb-slow.log systemctl restart mariadb && systemctl status mariadb
- Enable the slow query log to see queries with especially long duration
slow_query_log_file = /var/log/mysql/mariadb-slow.log long_query_time = 10 log_slow_rate_limit = 1000 log_slow_verbosity = query_plan log-queries-not-using-indexes
Related
pt-query-digest
https://mariadb.com/kb/en/slow-query-log/
mysqldump --single-transaction
See also
- MariaDB:
mariadbcheck
,mariabackup
,mysqldump
, MyRocks,show (MariaDB)
MariaDB Changelog,50-server.cnf
, MariaDB engines, .ibd, .myd, .myi,/var/log/mysql/error.log, /var/log/mysql/mariadb-slow.log
, MariaDB files:.frm
,.ibd
,/etc/mysql/mariadb.conf.d/50-server.cnf
, replication, MariaDB slow queries,show databases;
, Aria, MyISAM, MariaDB SkySQL, binary log, 3306,/etc/mysql/
Advertising: