How can I make each row in the resultset returns multiple times?
I'm writing an application that uses Mysql and for now my tables don't have many data in it. I want to test how my application handles a larger amount of data. In order to d开发者_如何学运维o that I need each row in the resultset to repeat itself several times.
I know that I can run the query and UNION it with the same query and UNION that with the same query. Is there a different way that makes it easier for me to choose how many duplications will occur?
Make sure you have a table to insert into
To generate dummy data. http://www.generatedata.com This will generate the data as well as the insert scripts.
Then Just create a massive dataset
You could do a cross join on itself, which would yield 2^n results, but it's all going to be dirty hacks
精彩评论