Q:

PDOStatement::execute takes 11s, what to do?

Our Drupal site is sslllooooowwwww, at best taking 3s for static-content pages, at worst 11s for shopping cart pages. Above is the profile for visiting the shopping cart. Profiling reveals that PDOStatement::execute is the #1 time consumer. Any advice why or what to do about it?
Not sure if indicator that my connection has problems, Drupal is inefficiently sending data, or if it's time to learn how to tweak MySql.

A:

It could mean any of a bunch of things.  PDOStatement::execute() is just the final method that gets called for each and every database query Drupal makes (which can be quite a few).
First, make sure you Apache is configured properly, and that APC is installed and has enough memory.
Then, I would make sure your MySQL instance has a decent starting point.  Download, run, and follow the advice of mysqltuner.
Then, download/install/enable the Performance Logging and Monitoring module and play around with the reports.
Figure out what is slow, and fix it.
There are also bunches of posts with other profiling advice, too, as well as advice for performance improvements beyond basic configuration (eg, advanced caching strategies).

A:

I suggest that you use the Devel module to debug this. You can turn on query logging in its option to list all the queries used in the display of the page and go from there. I would also try running the site on a different server - perhaps a dev server with plenty of resources - and see how it performs there. I would also check your syslog and mysql logs to see if there are any warnings there for you to consider or if your server is running out of resources.

