Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.Net Connection Pooling MySQL Temporary Table

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.

like image 958
fungus1487 Avatar asked Sep 30 '22 22:09

fungus1487


1 Answers

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.

like image 93
fungus1487 Avatar answered Oct 04 '22 20:10

fungus1487