[Mono-list] MySql pooling, correct way of doing it
philippe.grohrock at googlemail.com
Thu Jun 14 00:28:41 UTC 2012
Hello, I'm currently writing an application that needs regular, but not
steady connection to a database. I can't provide final numbers, but I think
my first versions will have an access of around 1 query per minute (per
user) and if I implement more function to the program it will go up to like
1 query per second (per user). After reading up a bit I /think /that
connection pooling will be the solution to go with. Now I just got a few
questions regarding this.
1. First of all, should I really use pooling or is opening/closing a
connection to the server each time I make a read request not that bad at
all, performance wise. Maybe I could manually hold back write requests and
then send them all at once.
2. In case I use pooling, how does it work? Assume that the following is my
string connection =
On a C# site I read that using the following will yield the correct result:
using (IDbConnection dbcon = new MySqlConnection(connection))
Then again there is the option to just use "Pooling=true", but how will that
work? Does the pool automatically get created based on server/db/user?
Forgive me if my questions are unclear or if I missed a good explanation,
but I am really confused about this.
View this message in context: http://mono.1490590.n4.nabble.com/MySql-pooling-correct-way-of-doing-it-tp4649936.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list