


Ranking performance improvements

Ranking performance was previously impaired by using multiple
JOINs to fetch the relevant `valuehistory` indices.
A single JOIN suffices and should enable ranking to run
in O(n^(1+ɛ)) time rather than O(n^(2+ɛ)).
This does not account for fetching the XP values from the
achievement table, which however seems to work quickly.

tradity/tradity-server,tradity/tradity-server