Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.