Fix cartesian explosion in pref loading (#32434)
Lol .AsSingleQuery(). Some people's preferences wouldn't load on Lizard. Turns out the entire preferences set is loaded with a morbillion joins in a single query and one person had 240,000 (!!!) rows returned for their preferences query. Yeah.
This commit is contained in:
committed by
GitHub
parent
4bca634ff6
commit
e36d735064
@@ -52,7 +52,7 @@ namespace Content.Server.Database
|
|||||||
.ThenInclude(h => h.Loadouts)
|
.ThenInclude(h => h.Loadouts)
|
||||||
.ThenInclude(l => l.Groups)
|
.ThenInclude(l => l.Groups)
|
||||||
.ThenInclude(group => group.Loadouts)
|
.ThenInclude(group => group.Loadouts)
|
||||||
.AsSingleQuery()
|
.AsSplitQuery()
|
||||||
.SingleOrDefaultAsync(p => p.UserId == userId.UserId, cancel);
|
.SingleOrDefaultAsync(p => p.UserId == userId.UserId, cancel);
|
||||||
|
|
||||||
if (prefs is null)
|
if (prefs is null)
|
||||||
|
|||||||
Reference in New Issue
Block a user