I'm using Entity Framework 6 Code First with an Oracle database (using Devart DotConnect for Oracle)
With a specific query with a SingleOrDefault, the query takes 1 second to complete :
-- Executing at 08.10.2019 10:04:04 +02:00
-- Completed in 1211 ms with result: d
But then, nothing happen during 3,5 minutes, until the connection is closed :
Closed connection at 08.10.2019 10:07:41 +02:00
During this time, the CPU of the database server goes up to 100%.
If I execute the same query directly on the database, it is very fast.
if I slightly modify my LINQ query, it is also very fast.
Do you have an idea what I can try to find the source of the problem and why there is a difference between executing the query directly or from Entity Framework ?