3 ms·
I think there's a circular argument that connections are expensive, queries are supposed to cheap, so anything you can pay for once at connection creation time
by hinkley 7y ago
I think there's a circular argument that connections are expensive, queries are supposed to cheap, so anything you can pay for once at connection creation time should be done then, which then guarantees that creating connections is expensive.
How much of that work has to be done for each session sharing one connection?
I'm a bit spoiled. The code I work on at work and the hobby project I'm designing share a common quality, in that they are both read-mostly. It is not going to be overly difficult for me to segregate read and write traffic and use separate connection pools - possibly separate servers. Just making that change is going to save me a considerable amount of overhead for resource management, including connections.