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:
None 
Category:Connector / Python Severity:S2 (Serious)
Version:1.4.3 OS:Any
Assigned to: CPU Architecture:Any

[31 Jul 2014 7:18] Alfranio Tavares Correia Junior
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.
[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

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.060 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.