Click here to Skip to main content
15,896,528 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Does ADO.NET Entity Data Model Framework take advantage of indexed columns at the time of search over a table?

Suppose you have a table "Person" with an indexed column "Age"

Is the code below faster than itself if no indexed columns exists in table "Person"?

var query = from p in context.People
            where p.Age == 20
            select p;   
Posted

1 solution

Hello Arpoarpo,

The where clause part of the code you gave is integrated into the SQL that gets sent to the DBMS by the "Entity Framwork". So yes, if there is an index on column "Age" it should be faster in returning data than
when the column is not indexed. If this is measureable depends on the amount of data in your table.

I hope that answers your question. If you have any doubt check back with me.

Cheers

Manfred
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900