Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Many times when trying to come up with an efficient database design the best course of action is to build two sample databases, fill them with data, and run some queries against them to see which one performs better.

Is there a tool that will generate (ideally straight into the database) large (~10,000 records) sets of test data relatively quickly? I'm looking for something that at least works with MySQL.

share|improve this question
add comment

closed as off-topic by Aaron Bertrand Jan 14 at 21:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Shopping list question - questions about which tool, library, product or resource you should use are off-topic here because they quickly become obsolete and often are just about the preferences of the answerer. If you have an issue with or a question about a specific tool, please revise your question to conform to that scope." – Aaron Bertrand
If this question can be reworded to fit the rules in the help center, please edit the question.

8 Answers

RedGate has a tool similar to what you're looking for, but it's destination is intended to be MS SQL Server.

http://www.red-gate.com/products/sql-development/sql-data-generator

You might also check out the following article:

http://www.sqlservercentral.com/articles/Advanced+Querying/jointestdata/197/

share|improve this answer
    
+1 for redgate sql data generator –  Aim Kai Jan 10 '11 at 23:02
add comment

Take a look at this function. You can generate names, phonenumbers addresses, zipcodes etc etc. This is completely done in MYSQL no need for other applications. http://moinne.com/blog/ronald/mysql/howto-generate-meaningful-test-data-using-a-mysql-function

share|improve this answer
add comment

I've been using mysqlslap. It cleans up after itself too.

Here's the article I read when I started using it.

share|improve this answer
add comment

Have a look at benerator

It is not easy to start with, but is quite powerful.

share|improve this answer
add comment

For anyone looking for a different solution to this problem... I wrote a test data generator project for Data Synchronisation Studio. It can generate a large dataset ranging from 1 to 100s of millions of rows of realistic testing dat. Here is a blog post all about it. http://www.simego.com/Blog/2012/02/Test-Data-Generator-Download-for-Data-Sync It's free to use for 15 days (once you have your test data, you have it)

share|improve this answer
add comment

The most cost-effective way is probably to use an open source or commercial data generator. I used to do that.

Now, in my golden years, I regard each need for test data as a mandate to learn another scripting language.

share|improve this answer
add comment

I typically generate my own, using some known data as input -- if it's too random, it's not always a good test; I need data that's going to be distributed similarly to my final product.

All of the larger databases that I have to tune are scientific in nature -- so I can usually take some other investigation as input, and rescale it and add jitter. (eg, taking data that was at a 5 min cadence with millisecond precision, and turning it into a 10 sec cadence w/ milisecond precision but a +/- 100 ms jitter to the times)

...

But, as another alternative, if you don't want to write your own, is to look at some of the benchmarking tools -- as they can repeat things over and over again based on a training set, you can use them to insert lots of records (and then just ignore the reports on how fast it did it) ... and then you can use that same tool for testing how fast the database performs once it's populated.

share|improve this answer
add comment

The best tool (if you can find it) is DataFactory. (Sadly out of print). I've generated absolutely delightful (and quite authentic-looking) datasets from it.

Generatedata.com is... acceptable, but doesn't scale very well.

DataGenerator is something to keep an eye on.

And while DTM Data Generator is clunky and a poor substitute for DataFactory, it exists and is being sold, and I've used it to generate mildly acceptable data.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.