Hi, Ryan Chan wrote: > After reading the article, I think 'Query cache does not work" is a > strong enough reason not to use prepare statement.
@Bill: Remember our conversation from last month? Quoting such sources, if the reader isn't able to fully understand the content is as dangerous as talking about the overhead and prepared statements ;-) @Ryan: You need to understand, which prepared statements cannot utilize the query cache. There are binary and text statements and there is a different between calling just "prepare()" on a SQL command or on a SQL command, containing placeholders like "?" (=using binded parameters). This "problem" depends also on the used MySQL version. Because Zend_Db* is just calling prepare() and doesn't bind or use placeholders, we can easily say, that Zend_Db* isn't affected by any problems. You can check this too: Flush the query cache and reset the counters. Run a Zend_Db* query twice. Check the counters, the second run should be answered from the query cache. -- Regards, Thomas
