NodeJS iteration takes too long

Viewed 27

I have a few routes which do the following : on upload route: Accepts CSV file(200K Rows) > Save it in Postgres temporary table inside amazon s3 bucket > Save it in Postgres permanent table .

fetch route: Fetch both rows array of each table (tmp + table) > iterate over each for simple process (for comparison between rows feature) the problem is that the first iteration takes more than hour waiting to finish the iteration so my nodejs will not be able to finish task and send a response to the client. any suggestions?

0 Answers
Related