Stored Procedures or queries
-
Hi, I am completely new to using LINQ. I have worked on writing queries directly. and also using Stored procedures.I think using procedures gives a better performance. I dont know wheteher I am right or not I want to know which one is better Thanks in advance
-
Hi, I am completely new to using LINQ. I have worked on writing queries directly. and also using Stored procedures.I think using procedures gives a better performance. I dont know wheteher I am right or not I want to know which one is better Thanks in advance
Performance wise stored procedures will usually have the best performance because its query is actually being ran on the database server, as opposed to linq where the query is ran on the client.
-
Hi, I am completely new to using LINQ. I have worked on writing queries directly. and also using Stored procedures.I think using procedures gives a better performance. I dont know wheteher I am right or not I want to know which one is better Thanks in advance
Linq is basically a workaround of queries with .NET objects in client, which you would be doing with loops earlier. Say, you have a list of objects of your own class, instead of writing a for loop, you can write a LINQ query to do your job. Later introduction of Parallel Framework with LINQ will result in better performance. Running queries or Stored procs in database is completely a different scenario. Dont confuse LINQ with database queries my friend. And of course for database stored procs work faster than normal queries as execution plan stored with the stored proc, which is absent for normal queries. :cool:
Abhishek Sur My Latest Articles Basics on LINQ and Lambda Expressions
Create .NET Templates