mcconnellj
MIS
I am using user-defined functions in a SQL View to create additional columns. For example, I may have a product function that receives a parameter from a field and uses a case statement to pass back a product description such as "receiver". I used to have the case statements embedded directly in the views, but the SQL became so complex with 10 different case statements.
From a best practice and performance perspective, is the use of functions in views appropriate? I.e., are user-defined functions slowing down materialization of the view in any way? From a documentation perspective, it sure seems cleaner. Are there other methods I have not considered that are more appropriate?
Thanks for your help!
From a best practice and performance perspective, is the use of functions in views appropriate? I.e., are user-defined functions slowing down materialization of the view in any way? From a documentation perspective, it sure seems cleaner. Are there other methods I have not considered that are more appropriate?
Thanks for your help!