/api/analytics call taking 45 seconds to respond

Hi ,

One chart in our custom DHIS app requires us to display the top 5 indicators for a specified data set section. These indicators are calculated as [data element value] / [sum of all data element values in the data set section]. We are using the /api/analytics to fetch all indicator values from dhis after which we are filtering out the top 5 values in our app to display it to the user

One of our data set sections has a little over 60 data elements and loading this chart is taking about 45 secs.

Is there any optimization we can do to make this call respond faster

Regards

Sandesh , SimiJ

HI Sandesh,

can you check that all indexes are present on the analytics tables? The number of indexes per table should be (no of cols - 3).

Please also post the SQL queries generated by analytics, you can find them in the tomcat logs.

regards,

Lars

···

On Tue, Aug 12, 2014 at 12:14 PM, Sandesh Sukumar Doolipeta sandeshd@thoughtworks.com wrote:

Hi ,

One chart in our custom DHIS app requires us to display the top 5 indicators for a specified data set section. These indicators are calculated as [data element value] / [sum of all data element values in the data set section]. We are using the /api/analytics to fetch all indicator values from dhis after which we are filtering out the top 5 values in our app to display it to the user

One of our data set sections has a little over 60 data elements and loading this chart is taking about 45 secs.

Is there any optimization we can do to make this call respond faster

Regards

Sandesh , SimiJ

Hi Lars ,

I see that all the indicators are present in the analytics tables.

The following are the tomcat logs generated ,

···

On Tue, Aug 12, 2014 at 3:56 PM, Lars Helge Øverland larshelge@gmail.com wrote:

HI Sandesh,

can you check that all indexes are present on the analytics tables? The number of indexes per table should be (no of cols - 3).

Please also post the SQL queries generated by analytics, you can find them in the tomcat logs.

regards,

Lars


Sandesh DoolipetaApplication Developer
Email
sandeshd@thoughtworks.com

Telephone
9686062727

ThoughtWorks

On Tue, Aug 12, 2014 at 12:14 PM, Sandesh Sukumar Doolipeta sandeshd@thoughtworks.com wrote:

Hi ,

One chart in our custom DHIS app requires us to display the top 5 indicators for a specified data set section. These indicators are calculated as [data element value] / [sum of all data element values in the data set section]. We are using the /api/analytics to fetch all indicator values from dhis after which we are filtering out the top 5 values in our app to display it to the user

One of our data set sections has a little over 60 data elements and loading this chart is taking about 45 secs.

Is there any optimization we can do to make this call respond faster

Regards

Sandesh , SimiJ