Replies: 2 comments
-
Foe me, the reason is not the insert, the problem is with lock time when many workers select the same batch "for update".
you will have something like
It means 414555 seconds, 6909.25 minutes, 115.15 hous. Mysql "for update" can not handle it in right way. The solution I'm searching for is to use faster solution than management the batch in DB table |
Beta Was this translation helpful? Give feedback.
0 replies
-
No one find a solution yet? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to create several 10 million jobs.
I have tried it with for-loops and Bus::batch([]) and unfortunately the creation of the jobs takes longer than the processing of the jobs by the 10 servers/workers. That means the workers have to wait until the job shows up in the database (redis etc). With redis-benchmark I could learn that Redis is not the problem.
Anyway... is there a way to create jobs in BULK (not batch)? I'm just thinking of something like:
INSERT INTO ... () VALUES (), (), (), (), ...
Anyway, creating several million jobs in a for-loop or in batch seems to be much too slow for some reason. Probably because it's always just 1 query at a time and not an "upsert".
For any help I would be very grateful!
Beta Was this translation helpful? Give feedback.
All reactions