You can also stack the queries to run multiple rows in one insert
Insert into table values (row1col1, row1col2,'row1col3'),
Sent from my iPod
On May 31, 2009, at 8:18, דניאל דנון <danondan...@gmail.com>
I've a file of about 500,000 lines, each line contains a string in
of lengths, but no less then 3 characters and usually no more
average of about 80, and maximum of about 250.
I made a PHP script to fetch the data (using fgets), process it and
it to a MySQL database.
The problem is inserting to MySQL takes about 0.02 seconds, which
nothing - but when you have 500,000 lines to insert...
The while goes like that:
fgets from file
x1 = some function about the string
x2 = some other function about the string
x3 = the string
insert into table (field1, field2, field3) VALUES (x1, x2, x3)
I was wondering, is there any faster way to perform it, assuming I
do it with PHP?
also, if it matters - the MySQL table got id in auto increment.
Use ROT26 for best security
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php