Solved

What are the disadvantges in executing .net assembly in SQL Server ?

Posted on 2014-10-27
5
124 Views
Last Modified: 2014-11-25
Is it a good practice to execute the .net  assembly through SQL server ?
0
Comment
Question by:Varshini S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 125 total points
ID: 40407210
They are slower than straight SQL.

Their role is not to replace SQL, they are there to provide a way to perform operations that cannot be done or are hard to do from SQL, such as Office interop.
0
 
LVL 40

Assisted Solution

by:Kyle Abrahams
Kyle Abrahams earned 125 total points
ID: 40407373
Also it depends on if you own the DLL or not.  If you don't own the DLL (eg: you didn't compile the source to generate that DLL) you're trusting the user who provided the DLL that it's going to do what they say it will do.

There are ways around that (eg: de-compiling to verify) but it's a disadvantage in my mind.

Also to elaborate on why they are slower the DB has to load the dll into memory, then invoke the function in the CLR.  It also doesn't perform any kind of performance tuning or optimizations.

Lastly RAM usage could be another disadvantage (eg: the assembly will take up RAM space).
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 250 total points
ID: 40408120
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 40412016
Eric . . . where do you cover the advantages / disadvantages?
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 40412284
I don't have a section specific for pros/cons. I warn that SQL statements will always be faster then your CLR code.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question