MySQL Connector/Python Developer Guide/ The Connector/Python C Extension

Chapter 8 The Connector/Python C Extension

Connector/Python supports a C extension that interfaces with the MySQL C client library. For queries that return large result sets, using the C Extension can improve performance compared to apure Pythonimplementation of the MySQL client/server protocol.Section 8.1, “Application Development with the Connector/Python C Extension”, describes how applications that use themysql.connectormodule can use the C Extension. It is also possible to use the C Extension directly, by importing the_mysql_connectormodule rather than themysql.connectormodule. SeeSection 8.2, “The _mysql_connector C Extension Module”. For information about installing the C Extension, seeChapter 4,Connector/Python Installation.

Note

The C extension was added in version 2.1.1 and is enabled by default as of 8.0.11. Theuse_pureoption determines whether the Python or C version of this connector is enabled and used.