cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Bad performance of Time Series Chart working with QueryPropertyHistory

eyli
14-Alexandrite

Bad performance of Time Series Chart working with QueryPropertyHistory

I am using Time Series Chart, InfluxDB, and Value Stream. What I am doing is to use QueryPropertyHistory to have 1 hour data from InfluxDB to fill the Time Series Chart. The QueryProperyHistory is commanded periodically. The speed is really slow for the Chart to update. Does anyone know if there are any solutions on this? Maybe a cart with cache can help? 

ACCEPTED SOLUTION

Accepted Solutions
wposner-2
14-Alexandrite
(To:PaiChung)

The out of the box TWX time series chart widget is notorious for poor performance when attempting to render that many data points.  You can either look to a more efficient third party charting library like Plotly or run your data through the Interpolate service (infotable snippet) to reduce the number of data points.  

 

The BEST option, provided you have direct access to your instance of Influx, is to resample your data.  You can do this either on the fly or as part of some DB job that continuously maintains a subset of your data in another table.  Whichever strategy you choose, there is no reason to render 13,000 data points.  A resampling strategy will allow you to visualize your data within the specified time period.  As your time period gets smaller and more precise you can then look to bring in data from the value stream.  In your specific scenario, if one hour is approx 13k worth of data points, I wouldn't want to see the data in full granularity until I was looking at a time frame of only a few minutes.   

View solution in original post

6 REPLIES 6
PaiChung
22-Sapphire I
(To:eyli)

How many points are you pulling?

eyli
14-Alexandrite
(To:PaiChung)

I am pulling one hour data. It's around 13498 rows of data. The size is around 1.5MB. So It should make sense for this size of data. I am just wondering if there is some solution to let the chart refresh look more smoothly and fast. For example the old data is cached and only the new data is queried. Or do you know how can I query only specific fields but not all fields from InfluxDB?

wposner-2
14-Alexandrite
(To:PaiChung)

The out of the box TWX time series chart widget is notorious for poor performance when attempting to render that many data points.  You can either look to a more efficient third party charting library like Plotly or run your data through the Interpolate service (infotable snippet) to reduce the number of data points.  

 

The BEST option, provided you have direct access to your instance of Influx, is to resample your data.  You can do this either on the fly or as part of some DB job that continuously maintains a subset of your data in another table.  Whichever strategy you choose, there is no reason to render 13,000 data points.  A resampling strategy will allow you to visualize your data within the specified time period.  As your time period gets smaller and more precise you can then look to bring in data from the value stream.  In your specific scenario, if one hour is approx 13k worth of data points, I wouldn't want to see the data in full granularity until I was looking at a time frame of only a few minutes.   

eyli
14-Alexandrite
(To:wposner-2)

Thanks very much for your comments. I will look into the solutions.

PaiChung
22-Sapphire I
(To:eyli)

I believe some 'down sampling' type of functionality is also coming into some of the Thingworx charts, not sure what the release date is going to be.

eyli
14-Alexandrite
(To:PaiChung)

That's a good news. Hopefully it will come soon.

Announcements


Top Tags