DEV Community

Discussion on: Explain database connection pooling like I'm five

Collapse
 
keyboardinterrupt profile image
KeyboardInterrupt

I am no expert in "ELI5" so hopefully this is easy enough:

Setting up an Database connection/session is costly and "slow", There is protocol overhead, authentication, settings and so on.

If an application where to create a new Connection/Session for each Query individually this would have to happen every time, again, and again, so instead when a Session is created it is put into the Pool and reused.

also: en.wikipedia.org/wiki/Connection_pool