This is not a solution but a few steps to try out.
It is worth experimenting with different partition configuration and page size. By default, thingsboard uses MONTHLY partitioning , you can change it to DAYS or other supported values and check.
The default_fetch_size parameter decides the size of a page while fetching data from Cassandra, the default value is 2000 records, you can try changing that and obeserve.
Also, if you can modify the source code, you can add a custom partitioning logic like weekly or bi-weekly.