Changes between Initial Version and Version 1 of Ticket #33496
- Timestamp:
- Feb 6, 2022, 9:00:33 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33496 – Description
initial v1 1 Hi. I'm looking for a solution to save data on mirror database. using database routers allow us to save a record and let's us decide which database must be used and i think manual database selection is not optimal because it uses ORM to create raw SQL twice or more (based onnumber of mirror database).2 ``` 1 Hi. I'm looking for a solution to save data on mirror database. Using database routers allow us to save a record and lets us decide which database must be used and I think manual database selection is not optimal because it uses ORM to create raw SQL twice or more (based on the number of mirror database). 2 {{{ 3 3 model_obj.save(using='db_1') 4 4 model_obj.save(using='db_2') 5 ``` 6 i think django can handle this problem and optimize it by adding setting list variable called MIRROR_DATABASES so all mirror databases place in there and django save all of records by creating one raw SQL if mirror databases using the same backend 5 }}} 6 I think django can handle this problem and optimize it by adding setting list variable called `MIRROR_DATABASES` so all mirror databases place in there and Django save all of records by creating one raw SQL if mirror databases using the same backend.