Why use _mysql module and not use MySQLdb directly?

Chris Angelico rosuav at gmail.com
Sat Feb 8 06:42:30 EST 2014


On Sat, Feb 8, 2014 at 10:32 PM, Asaf Las <roegltd at gmail.com> wrote:
> Hi Chris
> The doc says
> https://pypi.python.org/pypi/mysql-connector-python/1.1.5
>
> MySQL driver written in Python which does not depend on MySQL C
> client libraries and implements the DB API v2.0 specification (PEP-249).

Ah. And that links to dev.mysql.com, so it's presumably the same
thing... would be nice if they'd say that on their own site. That's
what I was looking for, anyhow. Confirms the suspicion.

There may well be performance differences between pure-Python
implementations and ones that go via C, but having used a
pure-high-level-language implementation of PostgreSQL's wire protocol
(granted, that was Pike, which is a somewhat higher performance
language than Python, but same difference), I can assure you of what
ought to be obvious anyway: that performance is dominated by the
server's throughput and thus (usually) by disk speed. So it's going to
be pretty much the same with all of them; look for ancillary features
that might make your life easier, otherwise pick whichever you like.

ChrisA



More information about the Python-list mailing list