In the current state that the ratting totals are calculated it is running a sum for all time. Testing with a database containing ~2500 characters and multi-year old database (Zed's Motorcycle in discord) confirms limiting this down to 7 days still results in close to 20 seconds of 'hang time' to complete.
My SeAT instance with just 170 unique characters in this table results in sub 5 second full sum of all unique grouped results. This instance however is less than a year old.
With the statement current as is this took more than several minutes, limiting to 1 month was over 6 minutes to complete.
In the current state that the ratting totals are calculated it is running a sum for all time. Testing with a database containing ~2500 characters and multi-year old database (Zed's Motorcycle in discord) confirms limiting this down to 7 days still results in close to 20 seconds of 'hang time' to complete.
My SeAT instance with just 170 unique characters in this table results in sub 5 second full sum of all unique grouped results. This instance however is less than a year old.
With the statement current as is this took more than several minutes, limiting to 1 month was over 6 minutes to complete.
https://github.com/eveseat/web/blob/c9117941c9ddb5661e9daa7ad1263fc8e84df989/src/Traits/Stats.php#L71