Questions tagged [mysql-slow-query-log]

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

196 questions
1
vote
1 answer

Optimizing query in the MySQL slow-query log

Our database is set up so that we have a credentials table that hold multiple different types of credentials (logins and the like). There's also a credential_pairs table that associates some of these types together (for instance, a user may have a…
Jeremy Logan
  • 47,151
  • 38
  • 123
  • 143
1
vote
1 answer

MySQL 8 slow query issue

My MySQL 8 conf as below : [mysqld] slow_query_log = ON long_query_time = 5 log_slow_admin_statements = 1 log_queries_not_using_indexes = 1 But when I got slow query log in my table that will show : The query time do not match long_query_time…
Eric Wu
  • 35
  • 7
1
vote
1 answer

WP Slow queries / Duplicated queries - images

I have problems with slow and duplicated queries, I'll need assistance, I'm working on this for more than 10h+. Latest WP version - Latest Flatsome theme and just Query monitor and Woocommerce plugins installed. The first slow query I wanna know…
Milan M
  • 45
  • 5
1
vote
1 answer

Slow simple mysql query

I have a problem with the speed of query. Simple mysql query, but when I have a lot of records (currently > 1 000 000), the performance is really slow. Question is similar to this one, but can't find solution. Explain says that MySQL is using: Using…
wstudiokiwi
  • 880
  • 1
  • 15
  • 33
1
vote
3 answers

Mysql slow query log Errcode: 13 - Permission denied

I want to enable slow query log. When I execute the following query set global slow_query_log = 'ON'; I get : #29 - File '/var/log/mysqld_slow.log' not found (Errcode: 13 - Permission denied) I tried solution here…
Fred
  • 399
  • 3
  • 12
1
vote
1 answer

Is there a way to parallelise time.Sleep but keeping the effective execution time in Go?

I'm developing a slow query logs parser package associated with a slow query log replayer in golang. For the replayer, have the following piece of code (in which I added comments for readability): for { // method from my package that returns…
hacb
  • 175
  • 2
  • 10
1
vote
1 answer

query is taking long time

SELECT a.sectionid as sectionid, views.timestamp as timestamp, views.time_on_page as time_on_page, views.video as video, views.access as access, masterid FROM ( SELECT m.timestamp as timestamp, m.time_on_page as…
user14821698
1
vote
2 answers

query logging in MariaDB on Windows 10

How to enable {all type of, not just slow} query logging to FILE in MariaDB Server version: 10.4.11 running on Windows 10 ? I have modified my.ini file and added these line at the bottom but it did not…
Sourav
  • 17,065
  • 35
  • 101
  • 159
1
vote
1 answer

mysqldump cannot backup database

I am trying to backup a small database (15.7 KiB) using the below command line and keep hanging, keep in mind that there is nothing running the background, either no PHP queries: mysql -u root -pPASSWORD compet > /home/user/www/compet.sql mysql:…
1
vote
0 answers

Improving MySQL query performance for a large database

I have a simple query that do a join between two table. The main table has a date field that my query filter by a range of dates. But for a month period my main table has 37412 datas and for this values has others 914 794 items in child table. That…
Caio Silva
  • 11
  • 1
  • 3
1
vote
1 answer

mysql-slow.log displays 'information_schema' queries when 'log-queries-not-using-indexes' is enabled

I enabled log-queries-not-using-indexes in /etc/my.cnf I can see now my queries without indexes but the issue is my log is full of queries like this: SELECT CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.COLLATIONS WHERE COLLATION_NAME =…
zeflex
  • 1,487
  • 1
  • 14
  • 29
1
vote
1 answer

How to Keep Laravel SQl Query Time Under 5 seconds

My php application uses laravel 4.1.31. For database queries, it uses knockout js library through ajax. When the database size grows larger, the ajax loading becomes a problem because it takes too long and sometimes stops halfway. I'm not familiar…
Drunken M
  • 2,013
  • 2
  • 11
  • 18
1
vote
3 answers

mysql 'slow queries log' return a huge number of rows examined but explain seems ok

The sql query # Query_time: 16.536276 Lock_time: 0.000159 Rows_sent: 756 Rows_examined: 8392194 SET timestamp=1555422526; SELECT c.id AS c__id, c.company_id AS c__company_id, c.ordinary_price AS c__ordinary_price, c.nights AS c__nights, …
Panos
  • 11
  • 3
1
vote
1 answer

Codeigniter session query in mysql slow query

I'm maintaining a heavy traffic web app providing RESTFul API using codeigniter and mysql. After turning mysql slow query log with 1 second long query time following query is login repeatedly with execution time of 100+ seconds. SELECT…
1
vote
1 answer

Error use mysql-slow.log permission

I've a Galera Cluster Installation with three nodes. As requirement my MariaDB installation must be in different path that default, and user cannot be mysql. So I've moved all mysql data path and I've created a new user and group to manage the mysql…
SCG
  • 63
  • 2
  • 9