ceth
ceth

Reputation: 45295

Performance issue: t-sql vs clr

I am just wondering which will be faster t-sql function/procedure or clr version of one? A procedure works with database data and use cursors (t-sql version).

When should I use clr and when I should use t-sql to create procedures and functions?

Upvotes: 1

Views: 248

Answers (1)

marc_s
marc_s

Reputation: 754438

Simple rule-of-thumb:

  • data manipulation (SELECT, UPDATE etc.) are best left to T-SQL (but without cursors!)

  • while anything that has to do with processing (string/regex matching, date arithmetic, calling external web services etc.) is a good match for SQL-CLR

Upvotes: 5

Related Questions