Monthly Archives: November 2008

Enabling MySQL Query Cache with Zend Framework through PDO::MYSQL_ATTR_USE_BUFFERED_QUERY

It’s interesting that if you read through the Zend dB manual, they mention a big problem with Zend Framework, namely that since Zend uses prepared statements, if you’re running a pre-5.1.17 version of MySQL, you give up the benefits of MySQL’s query cache. They also provide the solution in one of their examples, but they neglect to tell you that it solves the problem.

If you look at example 11.7:

$pdoParams = array(
    PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true
);

you will find setting this parameter when starting the connection turns on the query cache.

Advertisements

First get together of the Los Angeles MySQL Meetup Group

On November 19th, the Los Angeles MySQL Meetup Group will meet for the first time. Infobright will be presenting their approach to analytic data warehousing. If you’re in the El Segundo area, please do join us.

Welcome to MySQL Talk

In my (copious) spare time, I’ll try to pretty up the blog a bit, but I was always a believer that good content was more important than pretty interfaces, so this ugly look should attract the right people 😉