0
My code imports data from one database to another. To avoid server overload, I am importing 100 out of 100 records into each ajax. I noticed that in the first requisitions, it takes about 40ms, however, as sending more requisitions, the return time grows a lot for 80ms, 100ms up to 400ms. I am using the mysql connection of the Codeigniter framework; I am also using, in a single part of the code, a php mysqli connection, and closing it in every request. I do not understand why as increasing the amount of requests takes longer. Is the Codeigniter connection not closing as expected?
Complicated to say something, the ideal serial run a profile to try to find the bottleneck and then try to solve the problem. Indexes can make instructions like Insert or update slower. As this import is done, you could put the code?
– rray
The import assembles a SELECT query based on some information I pass, so far I have only Select queries and there is no reason to increase the return time. Then I put this Select in an INSERT IGNORE and close the connection. The code is too big, there is no way to pass here. I do not understand why the returns are more and more time consuming if I do the same queries (only by changing the select LIMIT)
– Vinicius Maia