MySQL Forums
Forum List  »  Newbie

Re: fix "Deadlock found when trying to get lock; try restarting transaction"
Posted by: morteza ir
Date: June 24, 2011 03:47AM

Thank you for points.
I have the deadLock problem again. 3 days ago, i restore mysql backup script, and the problem was solved. But i cant do it all the time in real world. Do you know how can i solved it forever.
When i run 1000, return 200 ~ 400 deadlockس.

I changed innodb_flush_log_at_trx_commit to 2, and performance is same, yet.
--------------------------------------
> Use VARCHAR for variable length strings.
Thank you.

>Don't include unnecessary things in the PRIMARY KEY. I see a couple of cases where id is AUTO_INCREMENT, yet the PK includes extra fields.
Do you mean i should not use AUTO_INCREMENT field in PK?

>In guestdetail, PRIMARY KEY (`idGuest `,`idBook`) makes it efficient to look up a Book, given a Guest. Do you ever need to go the other way? If so, add another INDEX.
Im not proffesional. I should learn more about INDEX. And i use some feilds on PK , beacause i use them in the select queries(where section).

>Do you have the bandwidth to have 1000 outside connections running simultaneously? Will you have a million users? That might be how many you would need to actually see 1000 hitting Enter in the same 15 seconds.
Yes we expect to have approximately 60 hits in sec , in peak of traffic.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.