django-mysql
django-mysql copied to clipboard
HANDLER use prepared statements on MariaDB
Since MariaDB 5.3 HANDLER has supported prepared statements: https://mariadb.com/kb/en/mariadb/handler-commands/
"Starting from MariaDB 5.3 prepared statements work with HANDLER READ, which gives a much higher performance (50 % speedup) as there is no parsing and all data is transformed in binary (without conversions to text, as with the normal protocol)."
Would make handlersocket in #14 less important.
How-to http://varokism.blogspot.co.uk/2011/01/20-to-50-improvement-in-mariadb-53.html
So this isn't possible with mysqlclient/MySQLdb - there is no (binary) API for the handler statements. The only thing I know that implements prepared statements is the (kinda dead) oursql - but then didn't provide a user-facing API but instead did it for every statement on cursor.execute - see https://bugs.launchpad.net/oursql/+bug/1046706 .
Guess one would have to add the functionality to mysqlclient before starting here.
HANDLER dropped in #814.