MySQL partitioning table by date and hour
Use 12 partitions -- 10 days, plus one at each end.  REORGANIZE PARTITION to split the empty, future, partition at the end before the new day; drop the oldest.  All the details, including code, are spelled out in http://mysql.rjweb.org/doc.php/partitionmaint .

Hourly partitions would lead to over 240 partitions; that large a number slows things down.