Question

I have a data set of time series data I would like to display on a line graph. The data is currently stored in an oracle table and the data is sample at 1 point / second. The ask is to plot the data over a 6 month period of time. Is there a way to down sample the data inside of oracle (this can be done in various charts, but I don't want to move the data over the network). For example, if a query returns 10K points, how can I down sample this to 1K points and still have the line graph and keep the visual characteristics (peaks/valley)of the 10K points.

Was it helpful?

Solution

My advice is to display the values averaged over time intervals, and also make it possible to zoom in and display a shorter range averaged over shorter intervals, and to display the raw data (no average) when the time range is short enough.

For example:

  • when time range is greater than 1 month, average by days
  • when time range is less than 1 month and greater than 1 day, average by hours
  • when time range is less than 1 day and greater than 1 hour, average by minutes
  • when time range is less than 1 hour, raw data only (no average)

By the way, I'm pretty sure you can tell Oracle to do the averaging in the SQL query as a clause in your SELECT statement. I don't know the syntax.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top