0

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 do 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?

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
ufk
  • 30,912
  • 70
  • 235
  • 386
  • Please stop writing tags in titles. You've done it in pretty much all of your 239 questions. – Lightness Races in Orbit May 11 '11 at 13:54
  • If you don't mind, please explain how would I write my title better? I was just trying to be as clear as I can in the title. – ufk May 11 '11 at 13:57
  • I have already made the edit. You wrote "mysql sql: " at the start of your title; the _question tags_ feature exists to do this job for you, in a consistent and indexable way. They should not be duplicated in titles. – Lightness Races in Orbit May 11 '11 at 14:08
  • ok thank you! I'll make sure not to do these mistakes again. – ufk May 11 '11 at 14:17

2 Answers2

2

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

Rob
  • 1,235
  • 2
  • 19
  • 44
  • awesome website! thank you. in this specific case it won't do me any good because I can't have false data. I need to have valid data but duplicated. – ufk May 11 '11 at 14:18
  • @ufk - if it were me then I would have PHP loop the insert if its a one off – Rob May 11 '11 at 14:43
0

You could do a cross join on itself, which would yield 2^n results, but it's all going to be dirty hacks

Martijn
  • 11,964
  • 12
  • 50
  • 96