View Single Post
Old 02-18-2007, 02:42 AM  
Myst
Confirmed User
 
Join Date: Feb 2004
Location: Alberta, Canada
Posts: 4,708
is it normal for mysql to take 14+ seconds to do 10k inserts?

is it normal for mysql to take 14+ seconds to do something simple like (pseudecode) for x = 10000 to 20000; mysql_query(insert into users (muser) values ($x)) ???

muser is varchar, length 5, non primary (it is the only column in the table)

I am on a AMD Athlon 64 3500+ PC with 1gb ram.. this is all being done locally

the exact code im using is below

Code:
$dbcnx = mysql_connect('localhost','xxxxx', 'xxxxx'); 
mysql_select_db("testtable", $dbcnx); 
for ($i = 10000; $i <= 20000; $i++) { 
mysql_query("insert into users (muser) values ('$i')"); 
}
__________________
ICQ: 298-523-037
Myst is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote