Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 47887

All versions of MySQL (not Microsoft SQL Server). Please also add a version-specific tag like mysql-5.7 if that is relevant to the question.

0 votes
1 answer
1k views

MySQL thread states: update vs updating

This should be a simple question, but surprisingly, I can't find much about it: the difference in MySQL thread states update vs updating. … The MySQL docs say: update: "The thread is getting ready to start updating the table." updating: "The thread is searching for rows to update and is updating them" MariaDB says: update: "About to start …
Halfgaar's user avatar
  • 191
0 votes
0 answers
273 views

Query EXPLAINed differently on MySQL 5.6 (or Amazon RDS) and is very slow

l.idLog = ld.idLog INNER JOIN dataAttributes da ON ld.idDataAttribute = da.idDataAttribute WHERE l.idSite = 2776 AND l.timestamp >= 1430438400 AND l.timestamp <= 1433116800 limit 100; On our VM with MySQL … On our Amazon RDS (MySQL 5.6, db.m3.large, 1500GB, 4500 IOPS on SSD), which is a copy of the first DB, this is very slow. It also causes a CPU spike, that is not visible on the MySQL 5.5 server. …
Halfgaar's user avatar
  • 191
1 vote
2 answers
2k views

Mysql sync_binlog = 50 and innodb_flush_log_at_trx_commit = 2 with replication

I'm looking into sync_binlog = 50 and innodb_flush_log_at_trx_commit = 2 to improve write performance. There is this question, but it doesn't address the specific problems with replication. I have an …
Halfgaar's user avatar
  • 191
1 vote
1 answer
233 views

MySQL deadlock in simple table

tables in use 1, locked 1 LOCK WAIT 5 lock struct(s), heap size 1184, 3 row lock(s), undo log entries 2 MySQL thread id 15503218, OS thread handle 0x2b6fcb273700, query id 3125430892 172.31.0.175 vrm_dev … tables in use 1, locked 1 4 lock struct(s), heap size 1184, 2 row lock(s), undo log entries 2 MySQL thread id 15503217, OS thread handle 0x2b6fcbf25700, query id 3125430894 172.31.0.175 vrm_dev update …
Halfgaar's user avatar
  • 191
2 votes
Accepted

MySQL deadlock in simple table

The write intention lock docs say (emphasis mine, and yes, MySQL 5.7, because 8.0 didn't exist at the time): An insert intention lock is a type of gap lock set by INSERT operations prior to row insertion …
Halfgaar's user avatar
  • 191
1 vote
2 answers
2k views

MySQL Slave has unmanagbly higher IO load than master

My MySQL slave basically has 100% disk load all the time, and cannot get better than being a day behind. … I guess MySQL must be causing seeks. Edit2: I thing that might be useful: the thousands of new rows per minute are added using multi row insert statements. …
Halfgaar's user avatar
  • 191
1 vote
Accepted

MySQL Slave has unmanagbly higher IO load than master

I still don't really know how to see what exactly the slave is spending time on, but I was able to let the slave catch up. The problem was the action of deleting old rows with DELETE FROM table WHER …
Halfgaar's user avatar
  • 191
0 votes
2 answers
285 views

Interpreting MySQL (AWS RDS) CPU load and IOWAIT wrt threading model

If you have as many MySQL threads as CPU threads, all CPUs will be in IOWAIT. But, that's not to say they can't do anything else. … Like this (example, NOT the actual MySQL server; it's not about the numbers shown): …
Halfgaar's user avatar
  • 191
0 votes

Interpreting MySQL (AWS RDS) CPU load and IOWAIT wrt threading model

This kind of CPU vs IO, and the two graphs 'CPU load' and 'non CPU-load' are only reported when you have performance insight turned on, so it's reported by MySQL. …
Halfgaar's user avatar
  • 191
0 votes

Speed of MySQL query for the most recent 800 entries in chronological order

Two things: 1) do you have indexes? What does show index from ping_results say? 2) Don't use subqueries. Convert the query to a join statement.
Halfgaar's user avatar
  • 191
0 votes

UNION or SELF JOIN?

I would open up Mysql Workbench and do a graphical EXPLAIN on it, so you can see the query plan. You can then try the other situation too and compare the results. …
Halfgaar's user avatar
  • 191
0 votes
1 answer
216 views

Binlog commits and flushes on SQL Server (compared to MySQL)

With MySQL secondary/primary, sync_binlog and innodb_flush_log_at_trx_commit control log and disk flushing, and are important to maintain consistency between primary and secondary (so that the secondary …
Halfgaar's user avatar
  • 191
1 vote
1 answer
2k views

What is MySQL wait state 'wait/synch/mutex/innodb/lock_mutex'

We have an application (on Amazon RDS MySQL 5.7; db.m5.24xlarge; 96 cores) that takes in a lot of data, in parallel processors+queues. … 47137720436480 has waited at lock0lock.cc line 6342 for 0 seconds the semaphore: Mutex at 0x2b2be1000058, Mutex LOCK_SYS created lock0lock.cc:454, lock var 1 and many more Edit: also interesting in the MySQL
Halfgaar's user avatar
  • 191
1 vote
Accepted

What is MySQL wait state 'wait/synch/mutex/innodb/lock_mutex'

Test running the system on MySQL 8 shows a marked improvement: On a 96 core MySQL server, these are 64 queue processors (=64 processes) operating on the same table, but all on different rows (mostly updating …
Halfgaar's user avatar
  • 191
1 vote
1 answer
2k views

Reduce 'wait/sql/table/io/handler' load of high frequent updates on the same rows

We have a time-series application that also writes all the records to kind of a 'head' table in MySQL. This is somewhat of a legacy, but very interwoven and hard to get rid of. …
Halfgaar's user avatar
  • 191