Page 1 of 1
Filling a table with info for testing
Posted: Thu Jul 07, 2005 1:22 pm
by quince
I want to fill one of my database tables with a bunch of info(junk/anything) to test the search speeds when there are several thousand entries. is there some sort of dynamic insert loop I can use?
Posted: Thu Jul 07, 2005 1:50 pm
by John Cartwright
Code: Select all
for ($x = 0; $x < 10000; $x++;) {
mysql_query('INSERT INTO `table` SET `column1` = \'jdsfhsdhfjashfkshdffsdf\'') or die(mysql_error());
}
I would create a function that generates random strings in replace to inserting the same junk over and over though.
Posted: Thu Jul 07, 2005 1:55 pm
by quince
thanks! thats just what I'm looking for, I will make it a bit more dynamic and post it.
