MySQL Forums :: Perl :: Why I can't insert more than 100,000 rows in a script?(mysql+php)


Advanced Search

Why I can't insert more than 100,000 rows in a script?(mysql+php)
Posted by: Anghel Cojan ()
Date: March 23, 2008 04:35PM

Hello!
I'm having a script for inserting a number of rows into a mysql table.
it goes something like this

$i=0;
while ($i<300000)
{
$x=rand(1,58000);
echo "I'm inserting number $i - amount $x <br />";
$query="INSERT INTO sales (amount) values('$x')";
mysql_query($query) or die(mysql_error());
$i++;
}

The script works well , but the problem is that it has a limit of aprox 100,000 rows per call.
Why can't I insert more than 100,000 rows?Can somebody explain me?

(I'm using MYSQL 5.0.51a Community Edition)
Thank you very much.

Options: ReplyQuote


Subject Written By Posted
Why I can't insert more than 100,000 rows in a script?(mysql+php) Anghel Cojan 03/23/2008 04:35PM
Re: Why I can't insert more than 100,000 rows in a script?(mysql+php) Ben H. 04/22/2008 03:22AM
mysql + php santhanalakshmi s 04/30/2008 04:01AM
Re: mysql + php (percentile) Rick James 08/30/2008 03:24PM
Re: Why I can't insert more than 100,000 rows in a script?(mysql+php) Rick James 08/30/2008 03:18PM
Re: Why I can't insert more than 100,000 rows in a script?(mysql+php) nino walker 04/07/2009 11:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.