Why use _mysql module and not use MySQLdb directly?
roegltd at gmail.com
Sat Feb 8 13:09:08 CET 2014
On Saturday, February 8, 2014 1:42:30 PM UTC+2, Chris Angelico wrote:
> On Sat, Feb 8, 2014 at 10:32 PM, Asaf Las <r... 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.
Hmmm, they say :
"MySQL Connector/Python enables Python programs to access MySQL databases,
using an API that is compliant with the Python DB API version 2.0. It
is written in pure Python and does not have any dependencies except for
the Python Standard Library..."
i guess with Oracle connector there could be one advantage - they will
try to be most compliant to their product in every aspect as they would
raiser promote their DB instead of discouraging from it.
More information about the Python-list