episerver / content-ab-testing

Apache License 2.0
1 stars 1 forks source link

Warnings about missing query splitting #28

Open stefanolsen opened 1 year ago

stefanolsen commented 1 year ago

On a site running this package, I see a lot of logged warnings like the following.

Compiling a query which loads related collections for more than one collection navigation, either via 'Include' or through projection, but no 'QuerySplittingBehavior' has been configured. By default, Entity Framework will use 'QuerySplittingBehavior.SingleQuery', which can potentially result in slow query performance. See https://go.microsoft.com/fwlink/?linkid=2134277 for more information. To identify the query that's triggering this warning call 'ConfigureWarnings(w => w.Throw(RelationalEventId.MultipleCollectionIncludeWarning))'.

Seems like there is a performance gain to be won, if joins are replaced with query splitting.

Package versions: