I have an EF 6 query that has about 6 linq join statements in it. When I step through my code with the debugger, I can see that the query statement takes roughly 6 seconds to run. With a SQL trace, I can tell that the actual query, which looks like I would expect it to, takes 0 ms and returns 0 rows. I removed the join statements 1 by one. With each join statement removed, the EF statement took 1 second less to execute. The select portion of the query never changed, only the number of joins.
My question is, what is happening? What is EF doing that it requires so much time to process this query? Oddly, it looks like most of this time is actually spent after the SQL execution is already finished, so the time is not generating the query, but whatever EF is doing afterward.