THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Rob Farley

- Owner/Principal with LobsterPot Solutions (a MS Gold Partner consulting firm), Microsoft Certified Master, Microsoft MVP (SQL Server), APS/PDW trainer and leader of the SQL User Group in Adelaide, Australia. Rob is a former director of PASS, and provides consulting and training courses around the world in SQL Server and BI topics.

When is a SQL function not a function?

Hi! - Great that you've found this page, but it's no longer here! You can find the content over at: http://blogs.lobsterpot.com.au/2011/11/08/when-is-a-sql-function-not-a-function/

Published Tuesday, November 8, 2011 11:01 AM by Rob Farley

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

wilfred van dijk said:

Impressive under-the-hood information about the dark side of functions!

November 8, 2011 2:53 AM
 

John Hennesey said:

Very nice post!  I have had to explain this numerous times to folks when their query takes > 30 mins to run and by inlining things it goes down to 5-10 seconds.  Now I can stop explaining and refer them to this post. :)  thank you very much!

November 8, 2011 8:49 AM
 

Joe Celko said:

Nice article. I alwasy felt that the UDF was added to make proceural programmers feel good and to help them avoid learning declarative programming :)

November 8, 2011 10:12 AM
 

ALZDBA said:

Great post ! Very informative.

A ref to keep at hand.

[i]It will be a heck of a job to put that to a guitar tune :-)[/i]

November 8, 2011 2:56 PM
 

Rob Farley said:

Thanks everyone. I'm going to write a follow-up to this about the use of stored procedures in SSRS. It'll be a little controversial. But I'm moving house this week, so it might not be for a few days.

And ALZDBA - it could be okay, perhaps something along the lines of "You're not what you appear to be, you shouldn't run procedurally" :)

November 9, 2011 12:53 AM
 

Cade Roux said:

I always thought inline TVFs should have been named parametrized views and grouped with them instead.  Their treatment by the optimizer and performance profile is much more closely aligned with that.

I very much hope one day we will get inline scalar functions.  It is a shame that very simple utility scalar functions are so much more easily outperformed by inline code.  For maintainability, sometimes some simple scalar functions can be very useful - it would be nice if you didn't have to take such a performance hit to use them.

November 14, 2011 11:17 AM
 

Rob Farley said:

Little Bobby Tables’ mother says you should always sanitise your data input . Except that I think she’s

November 21, 2011 10:57 PM
 

Paul White: Page Free Space said:

The humble Compute Scalar is one of the least well-understood of the execution plan operators, and usually

September 4, 2012 6:22 PM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

Tags

No tags have been created or used yet.

News

News? Haven't you read my blog?

My Company


Can't find something?

Contact Me

IM: rob_farley@hotmail.com
Twitter: @rob_farley
Skype: rob_farley
E: rob_farley@hotmail.com

MVP (SQL Server)




Certifications








Adelaide SQL UG

Privacy Statement