Comment 2 for bug 1046706

Revision history for this message
BrindleFly (joe-kinsella) wrote :

What do you like about prepared statements? Since you can't access them, they provide you no external benefit as a caller, but give you a quantifiable performance degradation. The only reason I can think to like them is it allows the oursql implementation to avoid writing code to handle string interpolation of SQL arguments. This feels like a pretty expensive way to avoid client-side string interpolation.

Prepared statements can add some substantial overhead to each individual transaction, so are really only used when you plan to retain the statement for frequent use. I'd suggest we default to a dynamic interface like most other sql libraries, but make available the option to use prepared statements.