Re: contrib: hack for psycopg2 performance
Karsten Hilbert <[email protected]> Wed, 12 May 2010 12:49:23 +0200
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 10, 2010 at 10:54:46PM +0100, Daniele Varrazzo wrote: > > Great news everybody! > > in my first post to this list, I'd like to announce that I've been > > experimenting with the code, in order to boost the performance. > > > > One main idea is to effectively replace PQExec() with PQExecParams() and then > > avoid most of this quoting, casting etc. > > PQexecParams has the shortcoming of being able to send only a query at > time, whereas PQexec allows to send any number in a single string, > separated by semicolons. Many people use this feature and dropping it > would be an incompatible change. While that's understood and appreciated, would it be an option to allow the user to tell psycopg2 "yes, I know I can only use single queries per invocation but I do want you to use PQexecParams" ? I know I would use that in GNUmed. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346