So I am trying to insert 250 000 rows in to my database. As this is just sample data I just need to query a x, y variable that does change thus the for loops and just the terrain which is simply 'water'
But this is taking forever. Anyone know how I can make this happen faster?
ini_set('max_execution_time', 70000);
$conn = mysql_connect('localhost', 'root', '') or die(mysql_error());
mysql_select_db('hol', $conn) or die(mysql_error());
for ($y=0;$y<500;$y++) {
for ($x=0;$x<500;$x++) {
mysql_query("INSERT INTO map(x, y, terrain) VALUES($x, $y, 'water')");
}
}