FirebirdSQL / fdb

Firebird Driver for Python
https://www.firebirdsql.org/en/devel-python-driver/
Other
60 stars 26 forks source link

fdb Cursor reuse existing PreparedStatement [PYFB77] #92

Open firebird-automations opened 5 years ago

firebird-automations commented 5 years ago

Submitted by: Nathan Waite (nater)

In fdb Cursor.execute(), any time a string is passed a new PreparedStatement is created requiring a trip to the server. Can it instead reuse the existing prepared statement if the same string object is passed multiple times [consecutively]? In certain cases this would result in a dramatic (and free!) speed increase without requiring methods not in DB-API 2.0.