I have a large database with temperature values from April last year and I'm displaying all of them using JPGraph (along with different graphs for the last 2 days, last week etc.). Since there are so many values the graph doesn't look very nice and I want to display 50 values distributed evenly over the entire period.
I know I can get the total number of rows in the databse (x), divide that number by 50 (x/50 = n) and then get every n'th row.
Is there a MySQL query that can do this more efficiently?
Thanks!