The fact that oursql uses prepared statements is one of the things I like best about oursql.
I would like it if oursql would automatically cache the prepared statements, or would give us some way to cache them ourselves. -- You received this bug notification because you are a member of Agesys Team, which is subscribed to oursql. https://bugs.launchpad.net/bugs/1046706 Title: Prepared statements used for all queries Status in oursql: New Bug description: I am new to Python and oursql. In diagnosing why queries were so much slower in a Python vs. Ruby application, I noticed you are creating, using and then discarding prepared statements for EVERY query (see cursor.execute). As best as I can tell, this is to avoid dealing with the string interpolation of SQL arguments (e.g. which seems to be handled with varying degrees of success in MySQLdb module). It seems though this is a defect, since the two step process of a prepared statement adds overhead that can be substantial in some use cases. This overhead is typically only of use if you plan on actually re- using the prepared statement. Assuming my understanding above is correct, I would suggest the current interface should always be dynamic, since you do not intend to cache statements. I suspect most Python programmers who switched from MySQLdb do not realize the additional overhead they incur for executing a query, since this module defaults to dynamic SQL. To manage notifications about this bug go to: https://bugs.launchpad.net/oursql/+bug/1046706/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~agesys-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~agesys-dev More help : https://help.launchpad.net/ListHelp

