Table of Contents
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 a“pure Python”implementation of the MySQL client/server protocol.Section 8.1, “Application Development with the Connector/Python C Extension”, describes how applications that use themysql.connector
module can use the C Extension. It is also possible to use the C Extension directly, by importing the_mysql_connector
module rather than themysql.connector
module. SeeSection 8.2, “The _mysql_connector C Extension Module”. For information about installing the C Extension, seeChapter 4,Connector/Python Installation.
The C extension was added in version 2.1.1 and is enabled by default as of 8.0.11. Theuse_pure
option determines whether the Python or C version of this connector is enabled and used.