MySQL Forums
Forum List  »  Connector/Python

The performance is worse than pyMysql?
Posted by: ShuiXin Zhang
Date: October 11, 2016 10:06PM

I used pyMysql before. Now, I tried to use connection pool, and found there was a native pool implementation in the official connector. But, I compared their performance, and found MySQL Connector/Python have worse performance. Generally, I execute a select SQL, pyMysql cost 30 ms, but MySQL Connector/Python cost 100 ms.
Do you know how to tunning it?

I use the below code to get connection and execute sql.
dbconfig = {
'user' : 'xxxx',
'password' : 'xxxx',
'host' : 'localhost',
'database' :'test_db',
'pool_name' : 'mypool',
'pool_size' : 5

cursor = conn.cursor()
rows = cursor.fetchall()

Options: ReplyQuote

Written By
The performance is worse than pyMysql?
October 11, 2016 10:06PM

Sorry, you can't reply to this topic. It has been closed.

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.