Answer the question
In order to leave comments, you need to log in
What are the ways to unload a db on django?
There is a model, it has
8 simple fields (int, char),
2 Forein key,
1 many to many
2 JSONField (100 keys each)
Now there are 5000 records and the speed of obtaining is growing rapidly (1 object - 0.15 sec., at the beginning was 0.04). There is an idea to move JSONField into separate models, but sometimes you still have to merge . Are there any other optimization options?
Answer the question
In order to leave comments, you need to log in
You do two DB. Also you write in one all records satisfying HASHCODE (primaryKeys, 2) == 0
and in the second DB HASHCODE (primaryKeys, 2) == 1. At requests . you do request in two DB and unite result.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question