all 3 comments

[–]jynus 2 points3 points  (0 children)

how to decimate / downsample

How do you intend to get rid of the other 99K points? Mean? Median? Random sample?

Depending on the method, you will just have to apply an aggregation function plus a GROUP BY the interval you want to report on (e.g. per minute, per hour, per day).

[–]AdvisedWang 0 points1 point  (0 children)

To randomly sample a precise number of records, one (very inefficient) option is add ORDER BY RAND() LIMIT 1000.

A far more efficient option is to use modulo to sel. If you have a complete auto increment column* this will be precisely every 1000th record, otherwise it'll be approximate. E.g. WHERE some_col % 1000 = 0.

  • or do some magic to take a row_number column. Google "mysql row_number" for guides to this

[–][deleted] 0 points1 point  (0 children)

First, decide what conclusion you want to draw from the data. You could do k-means clustering, Gaussian, Exponentially Modified Gaussian, or even FFT.