Hmm I didn’t really think about that. I was basically looping connect, query, disconnect so they obviously weren’t synchronous. It was a test using PHP, so it probably wasn’t 100% reliable in terms of execution speed… interesting to get a rough idea though. I threw the file away once I was finished with it, I should have kept it and posted the script here. Shouldn’t be too hard to replicate though.
I continually measured the microtime since the request had begun, logging the microtime when each query occurred and once the total microtime reached just under one second I stopped the test.
The queries seemed to stop taking place about 300 microseconds before the second was up, so I suspected that the connections were being somehow limited. So I repeated the test with a two second duration, and sure enough there was a gap when connections were refused until the next second began.
Each time I ran this test I received an email from Media Temple warning me that my MySQL server had entered a Burst Container and that I should consider upgrading.
It’s important to note that these tests were performed on an (mt) server… and that the results may be different with different setups. Media Temple have a very individual server setup as far as I’m aware.
:-)