jeger003 Posted February 21, 2013 Share Posted February 21, 2013 Table Locks makes no sense to me. I read through the mysql doc but its been no help. I have multiple tables locking and other queries time out because of it. From my understanding: MySQL locks a table on any transaction whether its doing SELECT,UPDATE,INSERT etc. MySQL will not release the lock until either the connection has disconnected or it has completed the transaction. if thats the case then when is a row locked? How can I prevent table locks? my server does 90% UPDATE INSERT 10% SELECT, JOINS etc please dumb it down for me. Quote Link to comment https://forums.phpfreaks.com/topic/274780-issues-with-table-locks/ Share on other sites More sharing options...
fenway Posted February 23, 2013 Share Posted February 23, 2013 If you're talking about InnoDB tables, it's very rare to get a table lock during normal CRUD operations -- unless you somehow issue a write statement that can't use an index. Quote Link to comment https://forums.phpfreaks.com/topic/274780-issues-with-table-locks/#findComment-1414323 Share on other sites More sharing options...
jeger003 Posted February 25, 2013 Author Share Posted February 25, 2013 I am using InnoDB tables and i have been getting multiple table locks. The tables get 6-7 update and insert queries per second as well as 4-5 select COUNT(*) of all rows per second for live data. could this activity cause tables to lock? Quote Link to comment https://forums.phpfreaks.com/topic/274780-issues-with-table-locks/#findComment-1414807 Share on other sites More sharing options...
fenway Posted March 1, 2013 Share Posted March 1, 2013 What makes you think you're getting table locks? Quote Link to comment https://forums.phpfreaks.com/topic/274780-issues-with-table-locks/#findComment-1415749 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.