-
-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize migrations #5301
Optimize migrations #5301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This migration probably hasn't been run on lemmy.world yet, so this change could help there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume it would be safe for us to backport the changes to just this file on top of 0.19.8 to benefit from this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: you'd need to copy just the exponential controversy parts, because smoosh isn't going to be part of any v.0.19 release.
I'll try running it now, using lemmy.ml's prod DB, and output the times after its done. |
For some reason in running this migration, I'm getting the following error, saying it can't find the
Also the |
I'm guessing this will be fixed by #4673, so I'm running If that works we should probably add that line to the top of this |
The log output of the postgresql server provides more details about errors |
FROM | ||
person_post_aggregates | ||
FULL JOIN post_hide USING (person_id, post_id) | ||
FULL JOIN post_like USING (person_id, post_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theses full join
changes to smoosh
massively increased the time... they're going on 15+ hours now so I just canceled them.
So probably best to revert these to what it was before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried a different way. If it's still slower, then I will probably keep only a few changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmk. I'll test it again this weekend, because it does take a really long time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one runs the same speed, and doesn't take long, so doesn't matter to me whether we keep it or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes here still seemed to take an hour for the migration, so up to you whether to keep them or not.
K I ran this finally. With a locally optimized
So I think this is fine to merge. |
Slowness was revealed here: #4673 (comment)
The performance difference should be measured.