Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
First trials of benchmarking MySQL/Python DB interfaces
+0 Vote Up -0 Vote Down

Is there a performance penalty using a pure Python database interface? Yes there is. But how much? .. also depends on who wrote it.

I started implementing some benchmarking for MySQL Connector/Python. Main reason is to identified bottlenecks or just plain bad coded. Another reasons: it's cool and the question was raised during my talk at FOSDEM and also online.

Oh, yes, MySQL Connector/Python ain't fast right now. Just compare a script spawning 10 threads opening 1000 connections. It indeed just connects.

mysql.connector 0.1.3-devel average: 0.0091820
MySQLdb 1.2.3c1             average: 0.0026477
oursql 0.9.1                average: 0.0007394

(MacOSX 10.6.2, MySQL 5.1.42, Python 2.6.1)

I'm not surprised with how bad Connector/Python did. I'm more intrigued by how oursql is performing compared to MySQLdb. Nice!

Well, it's a start. Now off for a walk!

Votes:

You must be logged in with a MySQL account to vote on Planet MySQL entries. More information on PlanetMySQL voting.

Planet MySQL © 1995, 2013, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

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.