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
connection string:
string connection = 
                "Server=localhost;"+
                "Database=database;"+
                "USER ID=root;"+
                "Password=root;"+
                "Pooling=false";

On a C# site I read that using the following will yield the correct result:
using (IDbConnection dbcon = new MySqlConnection(connection))
{
     dbcon.Open();
}

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.
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to