I am transitioning from a programmer into DB and looking at this result looks like hieroglyphics to me. Can someone help me understand and read this result?
I executed the following code:
SHOW ENGINE INNODB STATUS;
and I got this result (please open it in pastebin)
https://drive.google.com/file/d/1n-8NEXz9xTt1dDG_w80vhes0Czg38V5c/view?usp=sharing
Thank you so much for your replies and I hope to learn so much from this community
Yep. It's hieroglyphics. I avoid it.
When it shows "the last deadlock", just look at the two queries -- that's the most important bit of info. Go find those queries in your code; see if you can speed them up and/or keep them out of each other's hair.
Your particular example ... Are you missing some COMMITs
? What is the value of max_connections
; sounds like it is ludicrously high. How fast are you repeating SHOW ENGINE STATUS;
? Maybe so fast that it is stumbling over itself?
I see these:
SELECT ID, groupid, FIELDTYPE, FIELD, FIELDID, OLDVALUE, OLDSTRING,
NEWVALUE, NEWSTRING
FROM changeitem
WHERE (groupid IN (2148520, 2148521, 2148954, 2148955, 2148957,
2337772, 2694891)
)
Is there an index starting with groupid
in changeitem
?
UPDATE userhistoryitem SET entitytype='Searcher', entityid='status',
USERNAME='armine', lastviewed=1527555906745, data=null
WHERE ID=385440
Is ID
the PRIMARY KEY
of userhistoryitem
?