I know this is an odd question to ask, but I'd like to find out if there is a MySQL query I can create without already having millions of rows in my database that will consume resources and run for a long time. My ultimate goal is to test my application in cases of resource contention and make sure that my methods for handling failure (specifically server timeout) are correct.
If there another way I can test this without creating and executing a high-resource query, I'd appreciate hearing that as well.
The MySQL maximum row size limit of 65,535 bytes is demonstrated in the following InnoDB and MyISAM examples. The limit is enforced regardless of storage engine, even though the storage engine may be capable of supporting larger rows.
There's no worry as long as there's no problem. A query can take up to one hour if it crunches extremely large amount of data once every 6 months in a system where only it is running. It won't be a problem. Another query can take 100ms only but it's on a web server and 1000 persons are connecting simultaneously!
Log in to your server by using Secure Shell® (SSH). Use the sudo command to edit my. cnf , the MySQL® configuration file. Locate the timeout configuration and make the adjustments that fit your server.
I assume you could use benchmark()
for this, although that isn't the scope of it.
select benchmark(9999999999, md5('when will it end?'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With