Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using MySQL server 5.1.45. And I am having a procedure with huge business logic. With less number of invocation of this procedure, my application is working fine, but when the number of invocations are getting increased this procedure is throwing Lock wait timeout exception.

My Question is will Procedure creates temporary tables dynamically..?

As in my procedure I am using Truncate statement which may cause to release all transactions.

I am not DBA, please help me out of this.

share|improve this question

Procedure will not create temporary tables unless you tell it to create them. Perhaps it's best to split up that 'business logic' in a few different iterations.

Also make sure you are using proper indexes.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.