So, I’m importing millions of rows in my system to a resource that has some fields (around 7 fields) that are embedded resources.
I’m inserting the fields using bulk_create
with chunks of 10_000
rows.
I noticed that this operation was kinda slow, it takes around 36
seconds to insert the 10_000
rows.
I suspected that the issue could be because of the embedded resources, so I removed them and replaced with fields directly in the main resource.
After that, the same bulk_create
call takes 6
seconds to do the same work.
So, it seems that a embedded resource creates a big overhead when inserting a bunch of data.
Zack, do you think there is something that can be done to improve that, or that overhead is to be expected?