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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With