phpMyAdmin slow on startup
July 19th, 2012
Lately I've been running into a problem on my local machine with phpMyAdmin, where it would just hang after selecting the database. Blank screen, spinning beach ball, insane CPU usage... you know the drill. Today I'd had enough, and looked a little deeper into the issue.
It seems that the new(er) version of phpMyAdmin tries to find the rowcount of views in a database. It does that by querying:
SELECT 1 FROM `table`.`view` LIMIT 100000;
I have a database with a rather complex view, and running this query took longer than I cared to wait. Especially since 99% of the time, I'm not opening phpMyAdmin to use that view - so basically, I'm waiting for "Jan with the short last name" (I just love them new Facebook translations , they're quite funny most of the time). Personally, the rowcount of any table is not something I need up front. I'd opt for a phpMyAdmin setting to disable all (automatic) counts completely, but for the time being, the following setting does the trick for not trying to count the number of rows in any view:
$cfg['MaxExactCountViews'] = 0;
And, if you're not interested in correcting the InnoDB estimates this setting will remedy that too:
$cfg['MaxExactCount'] = 0;
Just place those somewhere in your config.inc.php and voilà, phpMyAdmin will not slow you down on startup anymore!
Pointy haired boss
Do you have similar issues? Contact us at Future500
We can tackle your technical issues while you run your business.
Check out what we do or write us at info@future500.nl