MySQL Connection Pooling [Dramatically increase performance]

preview_player
Показать описание
Dramatically increase performance using connection pooling with python's MySQL connector.

Such a small change can have performance gains upwards of 30%! Git Repo:

0:00 Introduction
0:48 Docker setup
2:00 Python import script
2:40 Connection pool syntax
7:00 Single connection test
8:30 Pool connection test
Рекомендации по теме
Комментарии
Автор

i love the controlled before and after comparisons, thank you

carsonl
Автор

I tried implementing connection pooling but in my test using pooling slowed down the request:
without pooling: 0.9s
pool size 20: 3s
pool size 32: 5s

The more I increase the pool size, the slower it gets. Any idea what's causing this?

pietraderdetective
Автор

Hi, just here to comment:

I'm not using PHP but I tried connection pooling in Express / Node / Js environment and this stopped my server from running out of memory.
What I think was happening is that for every request that was being made, a new connection was also being made. I switched the pool size to 1 and now it's no longer crashing. So far I haven't noticed any downsides, but I would figure that if there were many concurrent users then some of the users would experience delays in database read/writes.

Whatsgoodslime
Автор

dude watched stranger things before >< names tho... barbara steve

lillywild
visit shbcf.ru