views:

951

answers:

1

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?

+1  A: 

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

Blorgbeard