Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance: Stored Proc. vs Visual C#

Status
Not open for further replies.

newtoolap

IS-IT--Management
Sep 22, 2002
5
TH
We have a bunch of stored procedures (SP) in our financial application. Basically these SP will read in the financial contract table and generate the principal and interest payment plan. There are some inconvenience writing these SPs, some of which, we think, are slow to execute.
We are thinking about convert these SPs to Visual C# classes. We are afraid that the performance might drop significantly. The contract tables have up to 300,000 records.

My question is What are the pros and cons of Stored procedures vs Visual C#? (assume that the C# will be written by a good and experienced and ... programmers)

Thank you in advance.
 
Depends on the requirement.
If you are performing row by row operations then it shouldn't be written in t-sql as this is very innefficient - but then you should probably design so that this is not needed. Set based operations will be thousands of times faster. If you are performing operations on the whole table then t-sql wil be much faster if written properly.
You probably need a competent sql server designer/architect to look at the system.


======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top