C# code and SQL procedure performance question.?
-
Hi Friends, I am doing following things. 1) I am pushing 50 rows into a SQL table every 1 Min. 2) At same time, I am retrieving 180 Rows of data from same table based on primary key, using Views. 3) Now, from 180 Rows, I have to loop and find out open price, max price, close price. Currently I am doing using SQL Procedure to do the same. 4) My question is, If I directly use C# code (3.5 .NET framework) to retrieve all 180 rows from SQL (using select stored procedure) and loop through all the 180 rows to find close price, open price, high price in C# code. Will this be faster? 5) Or looping using WHILE in stored procedure in SQL would be faster? 6) Also I would like to know in terms of performance and robustness. Looking for expert opinion. :) Regards, AP
-
Answer:
I can tell you from personal experience that any record operations are quicker at the database level. We have benchmarked stuff like this. Although it is MUCH easier and there are many more language tools for working with values in C# as opposed to T-SQL, the database will indeed be faster. Whatever you do, DO NOT use any edmx (entity data model) garbage. If you're going to do the work in the .NET code as opposed to the database T-SQL, write your own stuff.
maverick at Yahoo! Answers Visit the source
Related Q & A:
- How to increase application performance with Centralised SQL Server?Best solution by Database Administrators
- How to output the results of an procedure in SQL server?Best solution by Stack Overflow
- How do I connect to SQL Server using C#?Best solution by Stack Overflow
- A question for people who have glasspacks or any other performance muffler on their Bonneville?Best solution by Yahoo! Answers
- How to convert Matlab .m file to C code?Best solution by mathworks.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.