That blog posting is puzzling me, if not to say, I believe it is misleading.
Hector Virgen schrieb:
Not the most scientific analysis but this guy seems to get better performance out of PDO:
Any of the PHP APIs are just tiny wrappers on top of the underlying C libraries. Mapping from the C call to a PHP call is always about about equally fast no matter how you do the mapping - in ext/mysql, ext/mysqli or PDO_MYSQL. If you compare equivalent PHP API calls with each other they should be very, very close together in performance.
I assume the blog posting is comparing apples and oranges, likely without the blog author being aware of it. For example, PDO is using a prepared statement emulation by default for MySQL. It could well be that the blog posting compares a native prepared statement and a non-prepared statement. Or, the blog posting has been written in 2009, it could be that for PDO persistent connections had been used whereas for ext/mysqli non-persistent connections had been used.
Moral is, forget about API performance. There's not much to squeeze out of how you map the very same underlying C library calls into PHP API calls. But it can help a lot to use proper API calls for the task.
Ulf -- Ulf Wendel, MySQL Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering Muenchen: HRB161028
