I'm creating a web app with
Django 3.1 and there's lots of
DB interactions mostly between three tables. The queries mostly use results that are recent inputs. So
query1 will run and update
query2 will use
table1 to update2
query3 will use the
column updated by
query2 to update other
table2. All these run every time users input or update info.
Perhaps a visual will be clearer.
query1 = Model1.objects.filter(...).annotate(...) query2 = Model2.objects.filter(...).update(A=query1) query3 = Model2.objects.filter(...).update(B=A*C)
I'm beginning to worry about speed between
PostgreSQL and can lose data when multiple users start using it same time. I read about
Django Asynchronous support, but it's not clear if I need celery or not.
This is a very simplified version but you get the gist. Can someone help me out here please.