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
0
votes
2 answers

Very slow performance on thousands of millions records in MYSQL query

id market_id date keyword sku a b c 1 1 2019-01-01 some text for this QAB-XU-VV 3.1 2.4 3.5 2 2 2019-01-02 some text for…
Alex
  • 1,148
  • 8
  • 30
0
votes
1 answer

MySQL slow query log empty commit

I am using AWS RDS slow log querys on a mysql database. I have a lot of this in the log: # Query_time: 0.613015 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 use XXXXXXX; SET timestamp=1567605603; commit; Some like this: # Query_time:…
Bruno Manzo
  • 353
  • 3
  • 15
0
votes
1 answer

How to Trace Mysql Slow-query-log-file Entries Using PHP Profiler

I just started using PHP profiler to find files in php script which caused slow mysql queries. Some suggested that I use xdebug to track it with the timestamp from the slow log-file entry compared to the files in php profiler that was executed at…
Drunken M
  • 2,013
  • 2
  • 11
  • 18
0
votes
1 answer

Which Files In My Application that Make Slow Mysql Query Log Entries

I have been struggling for 2 days for this problem and have not found a solution. I log mysql slow query with 10 seconds period. In the log file there are a huge entries with this statement: # Thread_id: 222244 Schema: user QC_hit: No #…
Drunken M
  • 2,013
  • 2
  • 11
  • 18
0
votes
1 answer

how to give privilege for global variable write in mysql like slow_query_log?

When I create slow_query_log rotation, I need one user for set & update slow_query_log as On and Off. How can I give permission for only this query or global variable access to user?
ajiraj2411
  • 13
  • 4
0
votes
2 answers

Difference between local MySQL query and production server query execution times

I am building a site that uses a lot of database queries, so I was kind of afraid this might happen. So, the issue here is this, I have several queries that use a lot of JOINs and some of the tables have a couple of thousand entries while some of…
0
votes
1 answer

Logging of MySQL Queries and Forwarding to Syslog/Event log

I was to able to enable Error log, General Query log, Slow Query Log and Binary Log and was able to forward the logs to Syslog. I have few questions about logging. 1) The error log is automatically forwarded to Event log in Windows. How do I forward…
Thunder Kay
  • 143
  • 13
0
votes
1 answer

Improve performance of query with large table?

I have a large table named 'roomlogs' which has nearly 1 million entries. The structure of the table: id --> PK roomId --> varchar FK to rooms table userId --> varchar FK to users table enterTime --> Date and Time exitTime …
Nilesh
  • 884
  • 3
  • 11
  • 22
0
votes
1 answer

when slow query ran on slave does it logs in master slow query log also

I have Master and slave replication using Maria DB I connected to slave DB and executed a query which is a slow query, but that slow query logged in both master and slave slow query logs
murali418
  • 76
  • 9
0
votes
1 answer

MySql Querys - Slow server

I have a CentOS 7 server. Since a few days the server behavior has been critically slow due a lot of mysql querys in the web app we have there. I´ve tried to setup mariaDB server.cnf to log the slow-querys and the general-querys whitout having any…
Andres Zambrano
  • 23
  • 1
  • 10
0
votes
1 answer

Kill Long Running Processes in MySQL

Scenario - you have hundreds of reports running on a slave machine. These reports are either scheduled by MySQL's event scheduler or are called via a Python/R or Shell script. Apart from that, there are fifty odd users who are connecting to MySQL…
MontyPython
  • 2,906
  • 11
  • 37
  • 58
0
votes
1 answer

MySQL slow query log bug? Logging quick queries

I've setup MySQL slow query log pretty much default: slow-query-log = 1 slow-query-log-file = /var/lib/mysql/mysql-slow.log long_query_time = 1 When I look at the output, I notice it logging this query: # Time: 180323 9:08:17 # User@Host:…
kasimir
  • 1,506
  • 1
  • 20
  • 26
0
votes
0 answers

How to avoid slow request to use envers at Spring boot

I am using envers at Spring boot project. @Repository public interface DataAudRepository extends RevisionRepository, JpaRepository { } If there is numerous data on the data_aud table (data number : 3500),…
0
votes
1 answer

Filter or Log MySQL log for a particular table

In MySQL via are getting the logs from the file /var/log/mysql/mysql.log and we can monitoring the live queries through tailing this file using the tail command. The problem is all the queries are logging here, Is there any way to log or filter…
nifCody
  • 2,394
  • 3
  • 34
  • 54
0
votes
1 answer

MariaDB waits after canceling index creation

We have a MariaDB database running WordPress 4.8 and found a lot of transient named records in the wp_options table. The table was cleaned up with a Plugin and reduced from ~800K records down to ~20K records. Still getting slow query entries…
rwfitzy
  • 413
  • 5
  • 16