I think the idea behind selecting the first 10 minutes of every hour was to ensure a sufficient amount of the prometheus scraped data was retained to make it useful. I may of course be able to reduce this.
If this is intended everything is well. I thought maybe this is unintentional and the script is expected to keep data for the whole hour
Potentially our guide on Sharding and Partitioning for Time Series Data could be interesting for you as well to find an efficient sharding strategy to optimise your query performance.