The syncWithoutDetaching
method can cause excessive RAM consumption in large databases
#53556
Unanswered
MohammadZarifiyan
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I would suggest to use mass update instead of this for this case. Bear in mind it will not trigger events like that. So in conclusion I don't think this is a bug/issue. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
11.32
PHP Version
8.1
Database Driver & Version
MySQL 8.0.31
Description
Using
syncWithoutDetaching
will cause a shortage of RAM in the system.Steps To Reproduce
First create
post_user
pivot table and add 10 million rows to it. The run the following code:Beta Was this translation helpful? Give feedback.
All reactions