The question has been closed Jul 20, 2010 at 05:55 AM by Grant Fritchey for the following reason:
It depends on the result? What do you want the subquery or function to return? If function is well written, and as inline, if runs very fast. If you write your subquery basd, you can end up with some real RBAR.
answered Nov 16, 2009 at 04:39 AM
You can use both equally poorly or well.
I could write a function which was lightning quick and a sub-query that was slow, or vice versa.
This question, therefore, can only really be answered for a specific scenario, so if you want some help with a specific requirement, then please let us know that requirement and we'll undoubtedly be happy to help.
answered Nov 16, 2009 at 06:34 AM
Matt Whitfield ♦♦
What is your criteria for best? Are you looking for performance or maintainability? Functions 'usually' take a performance hit but are easier to reuse.
answered Nov 16, 2009 at 11:37 AM