<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/split-queries-with-ef-core-in-net-dh9sfrxgc" -->

---
title: Split Queries with EF Core in .NET | daily.dev
description: Explains Cartesian explosion in EF Core, where loading multiple collection navigations with Include() on a single query generates a joined SQL statement that...
canonical: https://daily.dev/posts/split-queries-with-ef-core-in-net-dh9sfrxgc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Split Queries with EF Core in .NET | daily.dev
og:description: Explains Cartesian explosion in EF Core, where loading multiple collection navigations with Include() on a single query generates a joined SQL statement that...
og:url: https://daily.dev/posts/split-queries-with-ef-core-in-net-dh9sfrxgc
og:image: https://api.daily.dev/og/posts/dh9sfrxgC.png
og:image:alt: Split Queries with EF Core in .NET
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Split Queries with EF Core in .NET

**[NikolaTech](https://daily.dev/sources/nikolatech)** · 4 min read · 0 upvotes · 0 comments

## Summary

Explains Cartesian explosion in EF Core, where loading multiple collection navigations with Include() on a single query generates a joined SQL statement that duplicates rows exponentially (e.g., 5 tags x 10 posts = 50 rows per blog). Shows how AsSplitQuery(), available since EF Core 5, breaks the query into separate SQL statements per navigation to avoid duplication, with example generated SQL for each split query. Covers configuring split queries globally via UseQuerySplittingBehavior and overriding per-query with AsSingleQuery(). Discusses trade-offs: split queries avoid row duplication but introduce multiple roundtrips, potential latency issues, and consistency risks in concurrent systems since queries run sequentially. Recommends benchmarking both approaches rather than assuming one is always better.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nikolatech.net/blogs/ef-core-single-split-query-dotnet>

## Questions this post answers

### What is Cartesian explosion in EF Core and why does it happen?

Cartesian explosion happens when EF Core loads multiple collection navigations (like Tags and Posts) on the same entity using a single joined SQL query, producing every combination of the two collections per parent row. For example, a blog with 5 tags and 10 posts yields 5 x 10 = 50 duplicated rows for that single blog, inflating memory usage and hurting performance.

_daily.dev surfaces practical EF Core patterns for developers tracking down query performance issues like this._

### How do I use AsSplitQuery in EF Core to avoid duplicated rows from multiple Include calls?

Add the AsSplitQuery() method after chaining Include() calls, for example dbContext.Blogs.Include(b => b.Posts).Include(b => b.Tags).AsSplitQuery().ToListAsync(). Available since EF Core 5, this breaks a single joined query into separate SQL statements, one for Blogs, one for Tags, and one for Posts, which are then combined in memory to eliminate row duplication.

_developers weighing EF Core query strategies can find more concrete patterns like this one on daily.dev._

### What are the downsides of using split queries instead of a single query in EF Core?

Split queries run as multiple sequential SQL roundtrips instead of one, which increases network latency, especially in cloud environments, and creates a risk of data inconsistency in highly concurrent systems since related data may change between the separate query executions. The recommendation is to benchmark both AsSplitQuery and AsSingleQuery approaches rather than defaulting to one.

_anyone deciding between EF Core query splitting strategies can compare trade-offs like these on daily.dev._

## Similar posts on daily.dev

- [EF Core 11 makes your split queries faster](https://daily.dev/posts/ef-core-11-makes-your-split-queries-faster-t9ltozeyp) · We Are .NET · 22 upvotes · 1 comments
- [6 EF Core Query Mistakes That Get Expensive in Production](https://daily.dev/posts/6-ef-core-query-mistakes-that-get-expensive-in-production-5cpkulovz) · Waseem .NET Newsletter · 9 upvotes · 0 comments
- [How to Fix Slow EF Core Queries: Practical Performance Tuning](https://daily.dev/posts/how-to-fix-slow-ef-core-queries-practical-performance-tuning-effrdqtga) · Syncfusion · 38 upvotes · 0 comments
- [EF Core Performance Best Practices in .NET 10](https://daily.dev/posts/ef-core-performance-best-practices-in-net-10-syq7fm9cv) · We Are .NET · 55 upvotes · 4 comments

---

Tags: [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/split-queries-with-ef-core-in-net-dh9sfrxgc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Split Queries with EF Core in .NET","url":"https://daily.dev/posts/split-queries-with-ef-core-in-net-dh9sfrxgc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/split-queries-with-ef-core-in-net-dh9sfrxgc"},"datePublished":"2026-10-04T13:06:58.603Z","dateModified":"2026-10-04T13:13:33.631Z","description":"Explains Cartesian explosion in EF Core, where loading multiple collection navigations with Include() on a single query generates a joined SQL statement that...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1b1c311842e4dd101ceda9a1c137baf5?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/1b1c311842e4dd101ceda9a1c137baf5?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"NikolaTech","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NikolaTech","logo":"https://media.daily.dev/image/upload/s--1h2fO6FL--/f_auto,q_auto/v1791119050/logos/nikolatech?_a=BAMAMicg0","url":"https://daily.dev/sources/nikolatech"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/split-queries-with-ef-core-in-net-dh9sfrxgc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":".net,c#","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NikolaTech","item":"https://daily.dev/sources/nikolatech"},{"@type":"ListItem","position":3,"name":"Split Queries with EF Core in .NET"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/split-queries-with-ef-core-in-net-dh9sfrxgc#faq","mainEntity":[{"@type":"Question","name":"What is Cartesian explosion in EF Core and why does it happen?","acceptedAnswer":{"@type":"Answer","text":"Cartesian explosion happens when EF Core loads multiple collection navigations (like Tags and Posts) on the same entity using a single joined SQL query, producing every combination of the two collections per parent row. For example, a blog with 5 tags and 10 posts yields 5 x 10 = 50 duplicated rows for that single blog, inflating memory usage and hurting performance. daily.dev surfaces practical EF Core patterns for developers tracking down query performance issues like this."}},{"@type":"Question","name":"How do I use AsSplitQuery in EF Core to avoid duplicated rows from multiple Include calls?","acceptedAnswer":{"@type":"Answer","text":"Add the AsSplitQuery() method after chaining Include() calls, for example dbContext.Blogs.Include(b => b.Posts).Include(b => b.Tags).AsSplitQuery().ToListAsync(). Available since EF Core 5, this breaks a single joined query into separate SQL statements, one for Blogs, one for Tags, and one for Posts, which are then combined in memory to eliminate row duplication. developers weighing EF Core query strategies can find more concrete patterns like this one on daily.dev."}},{"@type":"Question","name":"What are the downsides of using split queries instead of a single query in EF Core?","acceptedAnswer":{"@type":"Answer","text":"Split queries run as multiple sequential SQL roundtrips instead of one, which increases network latency, especially in cloud environments, and creates a risk of data inconsistency in highly concurrent systems since related data may change between the separate query executions. The recommendation is to benchmark both AsSplitQuery and AsSingleQuery approaches rather than defaulting to one. anyone deciding between EF Core query splitting strategies can compare trade-offs like these on daily.dev."}}]}
```

