Andrew Harry
Andrew Harry

Reputation: 13909

Linq to Sql: Where condition order impact

With a LINQ-TO-SQL linq query - does the SQL generated respect the 'Where conditions' order?

For instance:

int[] result = (from r in DB.Accounts 
                where r.AccountID > 10 && r.Name == "Harry").ToArray();

If there are thousands of rows, and there is an Index on the Name column, will the SQL query by the Indexed column first?

Upvotes: 0

Views: 1612

Answers (1)

Blorgbeard
Blorgbeard

Reputation: 103585

It doesn't matter - SQL Server will handle that.

Upvotes: 1

Related Questions