Reputation: 8169
I need to insert thousands of records into my database, and because of these insert queries the page takes too long to reload.
How can I make my page load faster and run all insert queries at the same time?
Upvotes: 1
Views: 1270
Reputation: 12265
There's a gem that allow you to bulk insert : https://github.com/zdennis/activerecord-import
Otherwise, maybe you could do the inserts in a background job.
Upvotes: 2