Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Count on properties is evaluated on sql for each of item. #15158

Closed
CrazyBaran opened this issue Mar 26, 2019 · 1 comment
Closed

Count on properties is evaluated on sql for each of item. #15158

CrazyBaran opened this issue Mar 26, 2019 · 1 comment

Comments

@CrazyBaran
Copy link

Steps to reproduce

I try to make count on list properties and this count query is evaluated for each of record, not as one query. It is bad performance.

db.Blogs.select(x=> new BlogsDto(){ PostsCount = x.Posts.Count})

Is there some not implemented functionality yet? I try also do this with include but also get 100 of Count query for each of Blog.
This code is simplified to get a problem.

EF Core version: 2.2.3
Database Provider: PostgreSQL

@CrazyBaran
Copy link
Author

Ok I find duplicate #11186

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants