Limit to display points from result

I am using mysql, My data saved for each second.
When set my time range for days, it will return too many rows and display comes slowly.

The way that limit the points from the result such as pick up points for each 5 minutes that I know is reduce the rows return to panel by update my mysql query statment.

But i want to know is there some better way that the grafana support shown points by skip an range from the result. For example: my query return result for each second, and panel shown the points for each hour.

Thanks for anyone help me out