Optimize question migration - #2722
Conversation
| .distinct("text_de", "text_en", "allows_additional_textanswers", "type") | ||
| .iterator() | ||
| ), | ||
| batch_size=2000, |
There was a problem hiding this comment.
Let's not do hasty changes to code for issues we don't fully understand. @janno42 do we have a specific understanding what part of this migration is problematic?
I would like to first have some test data for which we can reproduce the issue, and then properly check that a change here actually solves the issue. My mental model is that we have hundreds of questionnaires and maybe ten thousands of questions in production. This should be in the range of megabytes of data. We should easily be able to load those model instances, especially if no related models are ever loaded/accessed.
I could see that we have more answers than fit in memory, then we should do a targeted fix for that.
|
AFAIK this is not needed anymore. Feel free to reopen if the problems of the current migrations persist |
|
I think we likely will want to have this, we just want to have the evidence from production first. But closing until we have it seems like the right thing for our PR list 👍 |
redesign evaluation 0161 and 0162 migration so that all question objects are not stored in python.
batch_size2000 on plain querysets onlyfollowup for #2513