NYCPHP Meetup

NYPHP.org

[nycphp-talk] PEAR::DB prepare() and executeMultiple()

David Mintz dmintz at davidmintz.org
Wed Mar 23 09:42:32 EST 2005


On Tue, 22 Mar 2005, Daniel Convissor wrote:

> Prepare/execute is only efficient when you do one
> prepare of the query and then will be executing that the same exact query
> (without changing table/column names) multiple times.

Is this true even when the back end is MySQL 4.1.x and the underlying PHP
API is mysqli? I thought I read an article on zend.com that extolled the
benefits of prepare/execute and suggested it was always a win, but maybe I
was smoking crack again and misunderstood.

Follow-up question: is it a wash if you are only doing the query once, or
is it actually less efficient w/ prepare/execute than without? Let's
assume you are not working with TEXT or BLOBs



---
David Mintz
http://davidmintz.org/



More information about the talk mailing list