the problem is mysql commits after each insert so you're better running a combined insert:
Code:
$dbcnx = mysql_connect('localhost','xxxxx', 'xxxxx');
mysql_select_db("testtable", $dbcnx);
$cmd = "insert into users (muser) values ";
for ($i = 10000; $i <= 20000; $i++) {
$cmd .= "($i),"
}
$cmd .= "(20001)"
mysql_query($cmd);
should be blazing fast.