Hi, I've a Master/Slave DB configuration using DATABASE_ROUTERS and such, but recently i found that a script that has an intensive use of get_or_create started eating up to much CPU and resources, looking at the django code i found this:
def get_or_create(self, **kwargs): # Update kwargs with the related object that this # ForeignRelatedObjectsDescriptor knows about. kwargs.update({rel_field.name: instance}) db = router.db_for_write(rel_model, instance=instance) return super(RelatedManager, self.db_manager(db)).get_or_create(**kwargs) get_or_create.alters_data = True >From there i can tell that the get as well as the create are being done on the read DB and completely ignoring the read DB. So, my question is, is this intended or a bug? If intended, can you give me the criteria for this to understand it better please? -- Nicolas Valcárcel Gerente IT / CTO Celular: (511) 976 330 707 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.