Is slow performance for bulk_update normal for ORMs? #1235
Unanswered
saltysteev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
No replies to any of these discussions for the entire year so I can assume this library is somewhat neglected but here goes:
Is there a way to bulk_update fields and add to what the field already is?
For example, I'm trying to recreate this query:
I'm trying to update all users who are online.
So far the only way I can see this being possible in Ormar is this:
Then updating everyone's timer increasing it by 5
Running perf_counter this bulk_update takes almost 3 full seconds to complete. For only 60 rows I feel like this is very slow. Is there a better way to update multiple rows and increment a value more efficiently?
Beta Was this translation helpful? Give feedback.
All reactions