a log of SQL statements that took more than `long_query_time` seconds to execute that are automatically saved to mysql.slow_query_log table or an output file
Questions tagged [mysql-slow-query-log]
196 questions
0
votes
2 answers
joomla slow query log
I would know what are the queries that make slow my Joomla website. I know that there is the possibility to log all the slow query.
Unfortunately, I have only the access to the ftp where the website is hosted. Can I see this log also in ftp? Or I…

lucacatr
- 101
- 3
- 12
0
votes
1 answer
MySQL Slow Queries Fails
All, for a small application of mine on localhost, with MySQL installed by XAMPP under Win10, I'm trying to capture all queries. The sql below worked for a short while, but no longer is doing so, although it does report the overhead, shown below…

user1032402
- 410
- 1
- 3
- 11
0
votes
2 answers
Clear MYSQL Slow Query LOG - Rails
The following throws slow query log.
APN::Notification.
select('apn_notifications.*, devices.device_uid').
joins('INNER JOIN apn_devices ON (apn_notifications.device_id = apn_devices.id) INNER JOIN devices ON (apn_devices.device_id =…

Suganya Selvarajan
- 962
- 1
- 11
- 33
0
votes
3 answers
Slow Query on Rails joins
The following rails query throws back in slow query log:
Class ParserRun
scope :active, -> {
where(completed_at: nil)
.joins('LEFT JOIN system_events ON parser_runs.id = system_events.parser_run_id')
.where("system_events.created_at >…

Suganya Selvarajan
- 962
- 1
- 11
- 33
0
votes
3 answers
What would be the best indices for this kind of slow MySQL-Query? (InnoDB)
this kind of MySQL-Query is very slow at the moment.
What would be the best indices for this to speed it up? (InnoDB)
SELECT item_id,
Group_concat(storage_nr SEPARATOR ',') AS storage_nr,
Group_concat(condition SEPARATOR ',') AS…

Webbox
- 25
- 3
0
votes
0 answers
MariaDb Slow Query log - only query time is high
I have the following entry in my slow query log:
Query_time: 4.000347
Lock_time: 0.000095
Rows_sent: 0
Rows_examined: 0
update `my_table` set `a` = null, `b` = 'x', c= ... (updating around 20 fields) where `id` = 1234;
id is the primary key in…

brent
- 1,095
- 1
- 11
- 27
0
votes
1 answer
How to check slow_query_log for the current project I'm working on?
I've read good articles on enabling and logging slow_query_log, tried and it works.
But I would like to understand how to use it in real life scenarios.
I set the slow query log globally like below, which means its applicable to all databases?
SET…

112233
- 2,406
- 3
- 38
- 88
0
votes
1 answer
How to check slow_query for a project?
I just came across a very useful feature which is slow_query_log that checks queries that run slowly. I managed to execute the commands in the CMD following this link:…

112233
- 2,406
- 3
- 38
- 88
0
votes
1 answer
Enabling mysql slow query log during a certain time
I would like to enable the slow query log during a certain time interval every day - 00:00:00 UTC to 00:10:00 UTC. Is there any method to enable the slow query log in such a manner?

Annie
- 135
- 2
- 15
0
votes
0 answers
Mysql slow query , Lock_time and Rows_examined is 0
table structure :
CREATE TABLE `table` (
`ID` char(36) NOT NULL,
`Value` varchar(21000) DEFAULT NULL,
`Content` mediumblob,
`CRDateTime` datetime NOT NULL,
`Status` int(11) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID_UNIQUE` (`ID`),
…

Eeh
- 1
- 1
0
votes
0 answers
Slow Query Log containing Profiling results
I'm using MySQL/InooDB.
Currently slow query log is enabled on my server.
I want to see profiling result of a specific slow query when it executed.
I know how to do profiling, but for me it's not much useful to do it after a query is logged as slow,…

mrmowji
- 934
- 8
- 29
0
votes
2 answers
Weird query in mysql optimizer
I'm working with mysql 5.5.52 on a Debian 8 machine and sometimes we have a slow query (>3s) that usually spends 0.1s. I've started with the explain command to find what is happening.
This is the query and the explain info
explain
SELECT
…

OscarGz
- 1
- 3
0
votes
1 answer
Understanding MySQL log_queries_not_using_indexes behavior
I wanted to check if my server's queries are properly using index. So I enabled log_queries_not_using_indexes, and ran test-cases.
I found out that the following query is written on mysql.slow_log table.
SELECT * FROM user_rel
WHERE (f =…

redism
- 500
- 7
- 18
0
votes
0 answers
Compare the query efficiency between "2 joins and 1 union" and "1 big INNER join"
In mysql Distrib 5.5.49, the goal here is to generate Table C efficiently from the input, Table 0. Table 0 needs some calculation to generate Table A, and it will be joined by Table B to generate Table C.
However, the whole process is a bit slow…

Chubaka
- 2,933
- 7
- 43
- 58
0
votes
2 answers
cannot find mysql slow query log file on mac
I am trying to enable slow_query_log on mysql, but I could not find it on my mac.
I read in MySQL 5.7 Documentation that"
By default, the server writes files for all enabled logs in the data directory.
When I write show variables like…

mOna
- 2,341
- 9
- 36
- 60