diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs
index 5651d07566..b8dfac0342 100644
--- a/osu.Game/Beatmaps/BeatmapManager.cs
+++ b/osu.Game/Beatmaps/BeatmapManager.cs
@@ -300,7 +300,7 @@ namespace osu.Game.Beatmaps
///
/// The level of detail to include in the returned objects.
/// A list of available .
- public IQueryable GetAllUsableBeatmapSetsEnumerable(IncludedDetails includes)
+ public IEnumerable GetAllUsableBeatmapSetsEnumerable(IncludedDetails includes)
{
IQueryable queryable;
@@ -319,7 +319,10 @@ namespace osu.Game.Beatmaps
break;
}
- return queryable.Where(s => !s.DeletePending && !s.Protected);
+ // AsEnumerable used here to avoid applying the WHERE in sql. When done so, ef core 2.x uses an incorrect ORDER BY
+ // clause which causes queries to take 5-10x longer.
+ // TODO: remove if upgrading to EF core 3.x.
+ return queryable.AsEnumerable().Where(s => !s.DeletePending && !s.Protected);
}
///