From: Pieter-Jan Briers Date: Tue, 24 Sep 2024 20:43:02 +0000 (+0200) Subject: Fix cartesian explosion in pref loading (#32434) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=e36d735064d2f66156877a9d72ee1063ebb76425;p=space-station-14.git 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. --- diff --git a/Content.Server/Database/ServerDbBase.cs b/Content.Server/Database/ServerDbBase.cs index 3c59c36f77..b750c13e21 100644 --- a/Content.Server/Database/ServerDbBase.cs +++ b/Content.Server/Database/ServerDbBase.cs @@ -52,7 +52,7 @@ namespace Content.Server.Database .ThenInclude(h => h.Loadouts) .ThenInclude(l => l.Groups) .ThenInclude(group => group.Loadouts) - .AsSingleQuery() + .AsSplitQuery() .SingleOrDefaultAsync(p => p.UserId == userId.UserId, cancel); if (prefs is null)