3 ms·
Another useful trick you can do is to take advantage of memoization combined with BEGIN TRANSACTION / COMMIT to push at once a massive set of data. What I have
by stefanos82 3y ago
Another useful trick you can do is to take advantage of memoization combined with BEGIN TRANSACTION / COMMIT to push at once a massive set of data.
What I have done so far was to collect safe data, that is not sensitive info like passwords and such, and save them in an array (in my case I used PHP language), and at a specific number of elements you know it's enough to commit in your database, you do so only once via transaction; in my case was 25K rows and worked flawlessly without users realizing anything at all.
I have even done the same thing with 100K rows and didn't even break a sweat!