Brian Aker wrote:
Hi!

On Oct 13, 2009, at 6:56 AM, Jay Pipes wrote:

For #2 prepared statements can indeed come in handy, particularly when doing bulk operations.

To me, INSERT/UPDATE is where they pay off mainly because of the lack of needing to escape large objects.

Drizzle doesn't support multiple statements in a single communication packet, so does the above still make sense?

The "payoff" for prepared statements in Drizzle is having a pre-parsed syntax tree with placeholders for bound parameters that does not need to be parsed for every execution of the statement. What escaping needs to be done for large objects in Drizzle's INSERT/UPDATE statements, which do not allow multiple statements in a packet. Please explain.

As far as selects go, I certainly have used them there. A common from page query for slashdot for example had just two parameters and was called constantly for the page. In that instance a prep stmt was a big win (same for the SELECT *FROM USER WHERE user_id=?).

? This doesn't make sense to me. In what way does "SELECT * FROM USER WHERE user_id = ?" benefit from preparation if the connector does not keep the statement around? In other words, if the connection is closed upon end of the web request, what point does this have?

-jay

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to