Hello,

this is part of my api call :

http://xxx.xxx.xxx.xxx/api/historicdata.xml?id=2024&avg=0&sdate=2015-09-01-00-00-00&edate=2015-09-01-23-59-59&username=username&password=password

This takes a few seconds to generate. If I use a wider date range, it takes even longer.

What I am using this for is to store the data into a array inside PHP and then work with the array to calculate results. Isn't there a better way that I can code, to get the data more quickly ? Maybe draw from a report where the aggregation is the average of a day instead of hourly ? Then it would only need to retrieve 30 values instead of 1944.


Article Comments

Dear Cyberion

Please use the parameter &avg=86400 to generate average intervals of 1 day (86400 seconds.)


Oct, 2015 - Permalink

Thank you !


Oct, 2015 - Permalink