Re: Show innodb engine status tuning db server
Posted by:
Rick James
Date: October 06, 2013 01:43PM
> But why did my ibdata1 increase even though I am using innodb per-tablespace.
ibdata1 is used for a variety of things. You did something (transaction, undo, lock info, temp, etc) that need more space than previously.
> can it still cause the locking issue
Here is a very simple deadlock. Two threads (T1 and T2) are running 'simultaneously', and performing these actions in this order:
T1: BEGIN
T2: BEGIN
T1: UPDATE foo ... WHERE id = 123;
T2: UPDATE foo ... WHERE id = 987;
T1: UPDATE foo ... WHERE id = 987; -- This stalls, waiting for T2 to release its lock
T2: UPDATE foo ... WHERE id = 123; -- Deadlock! InnoDB realizes that T1 and T2 are now waiting on each other. Result: One of the transactions is ROLLBACKed; then the other continues.
The are two fixes for a deadlock:
(1) Change the logic so they won't happen.
(2) Catch them (check for errors), and restart any transaction that is aborted due to a deadlock.
A different 'lock' case is where InnoDB will give up after waiting 50 seconds to get a lock. It will then abort (ROLLBACK) the transaction. Adding suitable indexes helps avoid this by helping queries to finish faster.
Subject
Views
Written By
Posted
2482
September 15, 2013 09:37AM
1042
September 16, 2013 07:14PM
1583
September 17, 2013 08:52AM
1023
September 18, 2013 07:21PM
1087
September 19, 2013 09:08AM
993
September 23, 2013 12:48PM
987
September 24, 2013 08:45PM
1221
September 24, 2013 10:01PM
915
September 26, 2013 11:29PM
1055
September 27, 2013 03:53AM
942
September 27, 2013 11:52PM
1008
September 28, 2013 12:39PM
959
September 29, 2013 08:40AM
961
October 01, 2013 01:43AM
978
October 01, 2013 10:14PM
896
October 01, 2013 10:35PM
922
October 02, 2013 07:43PM
1028
October 02, 2013 11:08PM
977
October 03, 2013 07:48PM
988
October 04, 2013 09:04PM
Re: Show innodb engine status tuning db server
1065
October 06, 2013 01:43PM
880
October 07, 2013 09:06AM