Changes between Initial Version and Version 1 of Ticket #33496


Ignore:
Timestamp:
Feb 6, 2022, 9:00:33 PM (2 years ago)
Author:
Tim Graham
Comment:

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 on number of mirror database).
    2 ```
     1Hi. 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{{{
    33model_obj.save(using='db_1')
    44model_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}}}
     6I 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.
Back to Top