| Bug #73444 | Connector Python has performance issues when MySQL Fabric is in use | ||
|---|---|---|---|
| Submitted: | 31 Jul 2014 7:18 | Modified: | 25 Mar 2022 17:39 |
| Reporter: | Alfranio Tavares Correia Junior | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / Python | Severity: | S2 (Serious) |
| Version: | 1.4.3 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[31 Jul 2014 7:30]
Alfranio Tavares Correia Junior
Posted by developer: Please, check the forum thread http://forums.mysql.com/read.php?144,618084,618084#msg-618084 as well.
[25 Mar 2022 17:39]
Javier TreviƱo
Fabric support was removed in 8.0.12. https://dev.mysql.com/doc/relnotes/connector-python/en/news-8-0-12.html

Description: Connector Python shows some performance issues when MySQL Fabric is in use. The problem happens because connections are not being automatically cached. The following scenario, which is a common pattern when shard is in use, creates a new connection every time the "cursor" method is called, for example: params = { "fabric" : { "host" : fabric_host, "port" : fabric_port }, "user" : user, "passwd" : passwd } self.__cnx = connect(**params) While True: self.__cnx.set_property() cursor = self.__cnx.cursor() cursor.execute() How to repeat: Check the code. Suggested fix: Automatically cache connections when MySQL Fabric is in use.