How to improve execution efficiency
for($i=0; $i
';mysql_query($sql);}
There are more than 6000 records. if insert into is executed for each record, it takes a long time and exceeds the default 90 s. Is there any way to improve execution efficiency?
Reply to discussion (solution)
Error message:
Maximum execution time of 90 seconds exceeded
You can write the array to be inserted to the array first, and then insert the array in a unified manner.
For ($ I = 0; $ I
Error message:
Maximum execution time of 90 seconds exceeded
Time-out can be added to the header
Set_time_limit (0 );
?>
You can write the array to be inserted to the array first, and then insert the array in a unified manner.
For ($ I = 0; $ I
I tried it, but it was still very slow. Let me try set_time_limit (0. Thank you!
It must be slow to get $ r. only 6000 rows are slow. generally, it should be very fast!
It must be slow to get $ r. only 6000 rows are slow. generally, it should be very fast!
I posted the code. could you please help me.
$ File = 'upload/NGFile.txt ';
$ Str = file_get_contents ($ file) or die ("file opening failed ");
$ R = explode ("\ r \ n", $ str );
It is estimated that ngfile.txt is slow.
Now the society is already using hardware to adapt to software.
If you have a good server, you can do it.
It is estimated that ngfile.txt is slow.
Now the society is already using hardware to adapt to software.
If you have a good server, you can do it.
Thx