So yeah, I'm currently stuck on a simple code that my app should do pretty quickly, considering the same query runs in SSMS in about 34 seconds and uses around 90mbps:
But then, look at what EF does while running the same query:
Not even using ADO.NET makes it go as fast as SSMS. What gives? I've yet to try this with .NET Framework. Currently using .NET Core 3.1. Is this a bug?
Any pointers are greatly welcome, thanks in advance!
For those who encounter the same issue as me: The issue was because I was (rightfully) using
MultipleActiveResultSets=true. Turns out I'd have to disable it for this specific bit of code, then I can resume using it. Thanks to @Reza on https://stackoverflow.com/a/51824444/1598811 for that suggestion :)