Skip to content

Commit 071ed2c

Browse files
authored
Merge pull request #352 from peppy/query-optimise
Remove unnecessary (incorrect) `ruleset_id` clause from playcount recent query
2 parents 28960e9 + de47eb2 commit 071ed2c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

osu.Server.Queues.ScoreStatisticsProcessor/Processors/PlayCountProcessor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ public void ApplyToUserStats(SoloScore score, UserStats userStats, MySqlConnecti
4949
const int beatmap_count = 12;
5050
const int over_time = 120;
5151

52-
int secondsForRecentScores = conn.QuerySingleOrDefault<int?>("SELECT UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(ended_at) FROM scores FORCE INDEX (user_recent) WHERE user_id = @user_id AND ruleset_id = @ruleset_id ORDER BY id DESC LIMIT 1 OFFSET @beatmap_count", new
52+
int secondsForRecentScores = conn.QuerySingleOrDefault<int?>("SELECT UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(ended_at) FROM scores FORCE INDEX (user_recent) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1 OFFSET @beatmap_count", new
5353
{
5454
user_id = score.user_id,
55-
ruleset_id = score.ruleset_id,
5655
beatmap_count,
5756
}, transaction) ?? int.MaxValue;
5857

0 commit comments

Comments
 (0)