Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
If a table have 10 crore records or more, which approach is better in .net to retrieve faster? Using EF(Database First, Modal First, Code First) or Using Stored Procedure. I'm use MS SQL Server 2008 databse.
Posted
Updated 8-Aug-15 3:54am
v2
Comments
PIEBALDconsult 8-Aug-15 12:03pm    
That depends entirely on what you want to do with the data. Ideally what you need to do doesn't require you to retrieve the data at all.

1 solution

That isn't a question which makes any sense, unfortunately.
Entity Framework is a "layer" which sits on your .NET (c# or VB) application and which interacts with a DB.
Stored procedures sit inside SQL Server and execute on the server as if you had passed the code they contain as a single Command object.

They aren't comparable ways of doing things, the delay will be in the transfer of information between the DB server and your application not in how much of a command you have to pass to SQL.

The most appreciable delay you will meet will be in generating data for presentation, particularly if you are trying to display 100,000,000 rows of data to a user!
 
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