AFAICS its not getting executed as a SQL query, I think this is because the package collection gets passed not as IQueryable, but as Collection of packages which is the result of some earlier query. Will have to dig further into this if we want to get it working.

Note that this operation is already pretty slow for other reasons including doing 12 SQL queries overall which includes a number of repeated SQL queries: 83% of execution time is in SQL.
Tim

From: Jeff Handley [mailto:notifications@github.com]
Sent: Thursday, January 17, 2013 1:42 PM
To: NuGet/NuGetGallery
Cc: Tim Lovell-Smith
Subject: Re: [NuGetGallery] Fix AutomaticPackageCurator query so that it will be case insensitive (#728)


In Website/PackageCurators/AutomaticPackageCurator.cs:

> @@ -23,7 +23,10 @@ protected bool DependenciesAreCurated(Package galleryPackage, CuratedFeed curate

>                  return true;

>              }

>

> -            return galleryPackage.Dependencies.All(d => curatedFeed.Packages.Where(p => p.Included).Select(p => p.PackageRegistration.Id).Contains(d.Id));

If this was case-sensitive, that means it's being executed on the web server vs. being sent down to SQL. It looks like we've already fetched the graph into memory, but if that changed, this might fail when sent to SQL. Can you validate if this expression can be sent down to SQL please?

—
Reply to this email directly or view it on GitHub<https://github.com/NuGet/NuGetGallery/pull/728/files#r2688052>.