postgresql - Effective way to display the data in the chart -


i have application values stored in db, e.g. 1 value per second. 604800 values per 7 days , if want view value in graph need effective way how e.g. 800 values db if have chart 800px width.

i use aggregation logic mean value computed values in 2, 3, 4, 5, 6, 10, 12 minute interval , hour , day interval aggregates computed.

i use postgresql , aggregations computed statement:

 "insert aggre_table_ ... select sum(...)/count(*) ... timestamp > ... , timestamp < ..." 

is there better way how or what best way of data aggregation later displaying in charts?

is better trigger or calling stored procedures?

is there db support aggregations d3js, highcharts or google charts?

how aggregate data large topic independent of technology choices. depends largely on how sensitive data is, important indicators of data are, implications of indicators are, etc.

is single out of range point significant? or looking overall trend? these big questions answers aren't easy.

my general suggestion:

  • to display week worth of data, aggregate hourly averages.

  • provide range around line indicating distribution of points around each average

  • if significant happened within aggregated point, indicate separate marker

  • provide drill down capability each aggregated point see full detail charted, if level of detail important (chances are, it's not)


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -