Slow Query Log
⦁ Slow query log stores the information for querys that took long time to run.Enable Slow Query Logging :
For Stand Alone :
Go to /etc/my.cnf and add below entriesslow_query_log = 1long_query_time = 1slow_query_log_file = /var/log/mysql/slow-query.loglog_queries_not_using_indexes=1
For Galera Cluster :
Go to /etc/my.cnf.d/server.cnf file and add below
slow_query_log = 1long_query_time = 1slow_query_log_file = /var/log/mysql/slow-query.loglog_queries_not_using_indexes=1
Check Current values :
Login to MySQL or MariaDB and run below queries to check the current settings of slow query logging
SHOW VARIABLES LIKE 'slow_query_log';
SHOW VARIABLES LIKE 'long_query_time';
SHOW VARIABLES LIKE 'slow_query_log_file';
Enable General Log for Table :
To write logs into tables, the log_output server system variable is used. Allowed values are FILE, TABLE and NONE. It is possible to specify multiple values, separated with commas, to write the logs into both tables and files. NONE disables logging and has precedence over the other values.SET GLOBAL log_output = 'FILE,TABLE';
If General log is active for table, you can query the table to see the information.
SELECT * FROM mysql.slow_log;
Video Demo : How to capture long running queries in MySQL or MariaDB
HI, Can you show in window please
ReplyDeleteMua vé tại đại lý vé máy bay Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ tháng nào rẻ nhất
vé máy bay thanh hóa sài gòn giá rẻ
giá vé máy bay từ tphcm ra hà nội
vé máy bay đi huế giá rẻ
vé máy bay giá rẻ đi quy nhơn
taxi sân bay nội bài giá rẻ
combo bamboo vinpearl phú quốc
The best long range paintball guns are usually used by a sniper. Finding a good one will determine the performance of your game.If you want to be a good sniper on your team, then you need to have a Best Long Range Paintball Gun that is the best on the market. We have done extensive research and have come up with several top-notch options to ensure you make the right decision.
ReplyDelete