DBAPI Paramstyle

Andy Dustman farcepest at gmail.com
Mon Mar 28 16:43:28 EST 2005


Tim Roberts wrote:
> In theory, using a paramstyle allows the query to be sent to the SQL
> database backend and compiled like a program.  Then, successive uses
of the
> same query can be done by sending just the parameters, instead of
sending
> the entire query string to be parsed and compiled again and again.
This is
> commonly done with large production databases like SQL Server and
Oracle.
> For a complicated query, it can be a significant time savings.
>
> However, to the best of my knowledge, none of the Python dbabi
> implementations actually do that.

mx.ODBC does, since it is an ODBC implementation. I would be very
surprised if the Oracle adapter did not. MySQLdb does not yet, but
probably will by the end of summer (with MySQL-4.1 or newer).




More information about the Python-list mailing list