Saturday, 7 September 2013

MySQL Connection Pooling for Multiple Processes

MySQL Connection Pooling for Multiple Processes

I am creating a wiki engine to learn (more) about web programming. The
basic design is to have php scripts that simply run a C# program to do the
heavy lifting of database operations and generating html for the browser.
However, I have run into a bottleneck, which is that every MySQL
connection takes about 1.4 seconds, where the entire rest of the C# and
PHP code takes about 0.4 seconds.
So, I really want/need to speed up the initial event of connecting to the
database.
Is it possible to set up a connection pool in MySQL for multiple
processes, so that several C# processes can connect to my database very
quickly, instead of taking over a second? Or are connection pools only for
a single process that uses multiple threads?
Or, is there any other way to speed up the database connection for
multiple C# processes?

No comments:

Post a Comment