Description
Five profile-stats reconcile endpoints (stage, event, series, award, platform) exceed the 10s gateway timeout under normal load. Root cause: each endpoint performs an unbounded SELECT then individual UPSERTs in a loop. Add a composite index on profile_id, period and batch writes into chunks of 100.