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
1 answer
Timestamp query in mysql slow log
We are receiving multiple set time stamp and autocommit statement in mysql(Inno DB) slow query log.
SET timestamp=1470399103;
SET autocommit=1;
Which are taking long time to execute,Any lead ,why these are taking long time to execute.

dReAmEr
- 6,986
- 7
- 36
- 63
0
votes
1 answer
How to extract the number (count) of queries logged in the mysql slow query log for a 10 minute interval
As per my research I thought of using the mysqldumpslow utility to parse the log and extract the results, but not able to figure out how to use it. I want to get the count of number of queries logged in the slow query log for an interval of 10…

Sahil Kakroo
- 3
- 3
0
votes
2 answers
Why MySQL query from mysql-slow-log is not appearing to be slow when run in PHPMyAdmin?
I have a query responsible for output of clients list that is regularly run by users.
The query is:
SELECT SQL_CALC_FOUND_ROWS p.lname, p.fname, p.patronymic, p.job,
p.post, p.zip, p.city, p.address, p.id, p.additional,
…

user164863
- 580
- 1
- 12
- 29
0
votes
2 answers
Debugging Slow mySQL query with Explain
Have found an inefficient query in our system. content holds versions of slides, and this is supposed to select the highest version of a slide by id.
SELECT `content`.*
FROM (`content`)
JOIN (
SELECT max(version) as `version` from `content`
WHERE…

Matt Bryson
- 2,286
- 2
- 22
- 42
0
votes
1 answer
Can you enable Log Query on MySQL Replication Server?
On a replication server running MySQL 5.1.73, I enabled general and slow log queries. Yet nothing is logging to the log file after I restarted the server. I've googled the problem and I've seen "hints" that you cannot enable query logging on a…

Alby
- 426
- 2
- 7
- 17
0
votes
2 answers
Mysql innodb query returning slow result
I have following query which is taking time.
Mytable type is innodb and have primary key on field tsh_id
I have also added index on transaction_Id field
following is implementation inside my database stored procedure.
DECLARE lv_timestamp…

Kamran Shahid
- 3,954
- 5
- 48
- 93
0
votes
2 answers
How to enable, work with and analyse with Slow Query Log in MySQL?
The following questions will be answered.
How to enable slow query log in MySQL
How to set slow query time
How to read the logs generated by MySQL
Log analysis is becoming a menace day-by-day. Most tech companies have started using ELK stack or…

MontyPython
- 2,906
- 11
- 37
- 58
0
votes
1 answer
Mysql slow query log indicates few rows in table as low performance
explain extended SELECT check_fine from local_profiles WHERE (name = 'myprofile');
+----+-------------+-----------------+------+---------------+------+---------+------+------+----------+-------------+
| id | select_type | table | type |…

queryinfokit
- 1
- 1
0
votes
0 answers
PHP and optimization of MySQL query
I need to optimise SQL queries in my PHP code used by hugely over headed web service. I'am getting list of words.
1) get word identifiers
2) foreach identifier get word as php object
3) print word details in xml
Now I have a code that takes this…

Michał Ziobro
- 10,759
- 11
- 88
- 143
0
votes
0 answers
Slow queries - Typical Optimization Scenarios
I have experience slow queries on mysql database.
The database seems simple like words than set of words and related things like images, recordings, sentences to words.
Bluehost claim I have huge overhead and slow queries and need to optimize it.…

Michał Ziobro
- 10,759
- 11
- 88
- 143
0
votes
2 answers
how to speed up mysql regex query
I want to develope a site for announcing jobs, but because I have a lot of conditions (title,category,tags,city..) I use a MySQL regex statement. However, it's very slow and sometimes results in a 500 internal Server Error
Here is one example…

user3194762
- 1
- 2
0
votes
1 answer
Simple heavily-indexed table slow query in MySQL
I am having troubles with a particular query being slow. Although everything is heavily indexed, some similar queries working fine and the indexes are used, the query still is slow as hell. I cannot understand why, so maybe anybody can help.
Just…

patman
- 2,780
- 4
- 30
- 54
0
votes
2 answers
MySQL slow log even after indexing of the columns
I am using a mysql server in which I have set slow query log with following settings
log-slow-queries=/var/log/mysql/mysql-slow-queries.log
long_query_time=1
log-queries-not-using-indexes
I have set following event for every minute in mysql…

ganesh
- 1,006
- 14
- 30
0
votes
1 answer
How to speed up slow MySQL UPDATE queries with InnoDB tables
I have a very simple MySQL update query on my InnoDB table.
UPDATE `players_teams` SET t_last_active=NOW() WHERE t_player_id=11225 AND t_team_id=6912 AND t_season_id=2002 LIMIT 1
My table is structured as so:
CREATE TABLE `players_teams` (
`id`…

Jon
- 137
- 2
- 15
0
votes
1 answer
Rows_sent: 851 Rows_examined: 1649439, very slow query
log from mysql-slow-log:
Query_time: 11.632750 Lock_time: 1.317329 Rows_sent: 851 Rows_examined: 1649439
select record.name, dept.name, school.name FROM record
inner join record as r2 ON
record.number=r2.number AND record.year=r2.year
AND…

benck
- 2,034
- 1
- 22
- 31