Bad Performance Queries in MySql Entity Framework
Posted: Mon 27 Jul 2009 08:59
Hi,
I´m currently testing the Entity Framework with dotConnect 5.40.37.0.
Running a simple Limit-Query against a Table, results in a Query like this:
The Table is queried with a non limiting Subquery, which results in a full table scan.
Is there a way to optimize this?
Regards
I´m currently testing the Entity Framework with dotConnect 5.40.37.0.
Running a simple Limit-Query against a Table, results in a Query like this:
Code: Select all
foreach(Account account in entities.Accounts.OrderBy("it.AccountId").Skip(2).Take(3))
{
Console.WriteLine(account.AccountName);
}
SELECT
Project1.C1 AS C1,
Project1.AccountId AS AccountId,
Project1.AccountName AS AccountName
FROM ( SELECT
Extent1.AccountId AS AccountId,
Extent1.AccountName AS AccountName,
1 AS C1
FROM Test.Account AS Extent1
) AS Project1
ORDER BY Project1.AccountId ASC
limit 2,3
Is there a way to optimize this?
Regards