Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
vgr.raju
Yak Posting Veteran
95 Posts |
Posted - 2006-11-07 : 20:56:58
|
| Hi all, I am working on the Project where our architect decided to use the C# Stored Procedures.We use lot of XML Data types in tables to store our data.We extract the values through XPath queries.I actually compared T-SQL and C# stored Procedure for one particular scenario and the results indicate T-SQL is faster in that case.Most of the Operations we do in our databse are simple DML operations.I did refer the MSDN article which says T-SQL is better for DML Operations. I am not able to confront the architect with the materials I have at present. I would really appreciate if any one has done any perfomance comparisions between C# and T-SQL Procedures and scenarios.Any pointers and white papers would be really useful.I have already posted the request for white papers and articles and they do not specifically talk about the perfomance aspects C# and T-SQL.Thanks in advance! Thanks!Rajuhttp://www.trickylife-trickylife.blogspot.com/ |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-11-07 : 23:54:45
|
Part of the reason that white papers don't point out performance specifics is because there are too many variables that affect performance. This is why it's important to test on your own equipment, so that you eliminate it as a variable. What runs perfectly fine on your system could be terrible on another, and vice versa.quote: I actually compared T-SQL and C# stored Procedure for one particular scenario and the results indicate T-SQL is faster in that case.
quote: I am not able to confront the architect with the materials I have at present.
Not sure I see the logic of that. You have tests on your own system that show T-SQL to perform better. If you suspect that this is a trend then you should devise some more tests and run them. This is especially important if the MSDN material describes situations very much like what you work with. Show the tests to the architect (and his/her boss) and point out that even Microsoft has determined that these scenarios perform better with T-SQL. |
 |
|
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-11-08 : 00:12:31
|
| Why do you want to confront the architect? Are you concerned about the relation design being compromised by excessive use of XML? If so then work on showing that performance and reliability will be a problem because of the use of XML. However, it sounds like you want to show that using CLR code is bad, but there are plenty of cases where it is going to perform adequately or even equally with T-SQL (it doesn't have to be faster, just the same or close right?). T-SQL doesn't make for better relational design, so it's about code in the database. Don't just look for a "T-SQL good/CLR bad" argument - there are things that T-SQL is optimal for, but there are things that you can do equally well either way and the choice can be made based on suitabilty to task (ever wanted to use a regular expression in your T-SQL code?) and even developer preference. Certainly, if your architect wants to do everything in CLR code then they are not paying attention to the product documentation or the community.It's good that you're asking for white papers and articles, but be prepared to find in favor of both, it seems like you want to find that T-SQL is always better and that's not the case.Here's a good starthttp://msdn2.microsoft.com/en-us/library/ms345136.aspxhttp://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1135090,00.html |
 |
|
|
vgr.raju
Yak Posting Veteran
95 Posts |
Posted - 2006-11-08 : 09:55:26
|
| Thank you for your feedback.It really helps me to narrow down my area of focus.Thanks!Rajuhttp://www.trickylife-trickylife.blogspot.com/ |
 |
|
|
|
|
|
|
|