The backend of one of our web applications uses MySQL on Linux. It all works very well and fast.
But I also do a lot of my development on OS X, and have the complete live environment mimicked there. It all works correctly, but when several MySQL queries are run concurrently (due to some simultaneous Ajax calls), the MySQL on OS X responds annoyingly slow.
Both on Linux as OS X it's a stock install of MySQL, is anyone aware of a difference in default settings that could cause such a slowdown on OS X?
Edit some extra info, as requested
- There are only MyISAM tables
- I don't think the queries themselves are to blame, since they run fast when run one after the other, just not in parallel
- I have no idea at this time what the maximum number of users is for MySQL, those kinds of possible causes were what I was looking for when asking the question ;), I'll check it out
If you're running a good chunk of memory, you should set your MySQL install to use the my-huge.conf configuration file. If you're using the default install the defaults are probably far too conservative for your hardware.
HERE is a good article about MySQL configuration files
are those read-only queries or also updates?
if updates - do consider switching to innodb, myisam [as fa as i know] uses global lock whenever data is changed - so it does not utilize multicore capabilities.
Apple.com has a few great tips: Improving MySQL Performance
Especially
did the trick for me for some reason.