Nov-16-2016, 06:43 PM
Hi everyone,
I am quite new to this forum, however I believe there is a lot of nice python-fellows, so I came here with a problem
Here is a deal,
I have a typical Django app which has about 30 models, a quite small one. The issue I am facing with is that customers need a lot of different reports based on data that is stored in PostgreSQL. Each report involves a lot of different tables which makes it heavy enough to slow down the app, and 10 seconds of waiting for a response with a report is not sufficient. Even after optimizing Django ORM, I do not want to go down to the plain SQL if it is possible.
The idea I have in my mind is that we can duplicate some data and store pieces of reports in separate tables, so API for getting those reports will work very fast with a minimum amount of read-only queries to the DB.
Is there any other ways of achieving my goal? One more time, reports involve data from multiple tables and operations over it. So far I can't see any other way than processing it at night. Where can I find more information about an architecture or best practices of systems like that.
I am quite new to this forum, however I believe there is a lot of nice python-fellows, so I came here with a problem
Here is a deal,
I have a typical Django app which has about 30 models, a quite small one. The issue I am facing with is that customers need a lot of different reports based on data that is stored in PostgreSQL. Each report involves a lot of different tables which makes it heavy enough to slow down the app, and 10 seconds of waiting for a response with a report is not sufficient. Even after optimizing Django ORM, I do not want to go down to the plain SQL if it is possible.
The idea I have in my mind is that we can duplicate some data and store pieces of reports in separate tables, so API for getting those reports will work very fast with a minimum amount of read-only queries to the DB.
Is there any other ways of achieving my goal? One more time, reports involve data from multiple tables and operations over it. So far I can't see any other way than processing it at night. Where can I find more information about an architecture or best practices of systems like that.