tags:

views:

47

answers:

2

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.

+3  A: 

I assume you could use benchmark() for this, although that isn't the scope of it.

select benchmark(9999999999, md5('longtime no see'));
mhitza
@mhitza - this works perfectly, although I think I can hear my CPU softly weeping under the strain
justkt
A: 

WAITFOR DELAY '02:00' if you want to test timeouts.

uncle brad
Sorry, it's Friday and I strung out. This is, of course, MS SQL.
uncle brad