Question

We have a MySQL database which we use in our .NET MVC Web App. We implement connection pooling as it has some great performance benefits.

We also have some fairly heavy processing done in a few key stored procedures.

They create several temporary tables and user variables which remain valid for the life of a connection. However with pooling enabled these objects don't get reset / killed.

Should I just be re-initializing user variables and dropping/recreating temporary tables in this scenario?

The connections are guaranteed not to be accessed at the same time so I shouldn't have any concurrency issues when two SP's are executing/populating temporary tables etc.

Was it helpful?

Solution

So the answer was simply drop the temp table before recreating each time. There are no concurrency issues as it only ever can run one command at a time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top