![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi guys! What are you using for connection pooling, for read/write queries separation in your applications? MySQL Proxy? SQL Relay? Some other stuff? |
#3
| |||
| |||
|
|
On 2/21/2011 5:31 PM, vadim wrote: Hi guys! What are you using for connection pooling, for read/write queries separation in your applications? MySQL Proxy? SQL Relay? Some other stuff? First question is - why do you think you need connection pooling? |
#4
| |||
| |||
|
|
"Jerry Stuckle" <jstucklex (AT) attglobal (DOT) net> wrote in message First question is - why do you think you need connection pooling? Its useful because making a connection can be slow ... now I know that "slow" is relative, because its actually pretty fast, but by reusing an existing connection instead of opening a new one can yield a noticable ~~~ performance improvement |
#5
| |||
| |||
|
|
"Jerry Stuckle" <jstucklex (AT) attglobal (DOT) net> wrote in message news:ijup9a$ouc$1 (AT) news (DOT) eternal-september.org... On 2/21/2011 5:31 PM, vadim wrote: Hi guys! What are you using for connection pooling, for read/write queries separation in your applications? MySQL Proxy? SQL Relay? Some other stuff? First question is - why do you think you need connection pooling? Its useful because making a connection can be slow ... now I know that "slow" is relative, because its actually pretty fast, but by reusing an existing connection instead of opening a new one can yield a noticable performance improvement (assuming its a busy system with lots of connections being opened and closed etc, etc, ymmv). To the OP, how are you connecting to MySQL? because you might find connection pooling is already there. For example if you are using the .net mysql connector then it already supports connection pooling (although it might need turning on), whereas if you are using the odbc connector then it doesn't. Which in part comes back to Jerry's question of why do you think you NEED connection pooling. |
#6
| |||
| |||
|
|
To the OP, how are you connecting to MySQL? because you might find connection pooling is already there. For example if you are using the .net mysql connector then it already supports connection pooling (although it might need turning on), whereas if you are using the odbc connector then it doesn't. Which in part comes back to Jerry's question of why do you think you NEED connection pooling. |
#7
| |||
| |||
|
|
But of course connection pooling comes at a price. It ties resources on both ends (server and client). If done wrong, it has the potential to do real damage, from never released locks to several-hour-lasting transactions up to information leaking (through user variables and/or temporary tables). |
|
And even if done right: before the pool can hand out a connection it has to test it (wait_timeout any one?) which requires a roundtrip to the server. This alone already reduces the advantage over volatile connections by a fair amount. |
#8
| |||
| |||
|
|
It also seems that a previous connection user can do a lot to mess up a connection for the next user |
|
How many dozen system variables do you have to set back to standard values before giving the user the connection? Either that, or the user needs to set them before starting any useful work. |
![]() |
| Thread Tools | |
| Display Modes | |
| |