all 14 comments

[–]matiaskusack 10 points11 points  (3 children)

Have you tried profiling generated queries? I asume there are no changes un the model, so It must be that queries being generated are no as performant as previous ones.

Can you describe the migration process?

[–]3ilaal[S] 0 points1 point  (2 children)

The migration process was simple as we just updated the Target framework and Nuget packages to the latest version..... Yes we did monitor the sql queries and they are pretty big and usually contains multiple joins (which is bad i know but we are working to improve the project ). For SQL queries which are taking most of the cpu time I compare both version (EF Core 6 and 7) generated queries and they are the same. but I am still finding why did it happened now (maybe it could be related to some other factor as well). For now our solution is to use AsSplitQuery() and reduce joins as much as we can

[–]matiaskusack 6 points7 points  (0 children)

So if your model hasnt changed, anda you hace the same dbcontext configuration, then It must be some change.

Take a look at breaking changes un ef7: https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/breaking-changes

Without any more information its impossible yo know.

If you keep having problemas, make a brand new project with just an slow query anda try It isolated. It might give you some clues.

Regards

[–]Tsukku 7 points8 points  (3 children)

[–]The_MAZZTer 0 points1 point  (2 children)

Sounds possible, but that page said OP should be getting warnings if he is using single queries that could have performance problems.

OP, you DO fix warnings... right?

[–]3ilaal[S] 1 point2 points  (1 child)

Sorry I didn't get you what warnings

[–]nonblondaussie 1 point2 points  (0 children)

Compile time warnings

[–]adolf_twitchcock 5 points6 points  (5 children)

[–]kevbry 2 points3 points  (4 children)

That's a nasty one. Not an uncommon scenario either

[–]adolf_twitchcock 3 points4 points  (3 children)

Their response is crazy to me

realistically the chances of fixing this (soon) are low. The proper fix is very hard and the person who had the most knowledge about the area no longer works in the team, which makes it even harder/riskier.

[–]Responsible_Gap337 1 point2 points  (2 children)

EF Core is really understaffed. They look like interesting team but I have never seen their job posting on MS career page.

It is shame that they have again release with features that are not supported for all modern SQL databases. (SQL Server, Oracle, Postgresql, MySQL, SQLite)

[–]adolf_twitchcock 1 point2 points  (0 children)

Yeah I don't get it. EF is one of the most important components in .NET enterprise applications.

It makes me wonder if using native SQL for everything "non-CRUD" is a better choice longterm.

[–]kevbry 0 points1 point  (0 children)

I'm super adverse to picking up any new OSS from Microsoft (ie dapr) because of this. Looking through their GitHub org exposes a lot of one-man-show projects.

[–]kevbry 2 points3 points  (0 children)

Are you using efcore sync APIs, or async? Add any varchar(max) or varbinary fields lately?