Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function or Stored Procedure?
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01527340
Message ID:
01527404
Vues:
28
>>When you are saying, "inline table function" do you mean computed column?
>>
>>Also, when you are saying the "performance" problem, do you mean that if I include a scalar function in a SQL Select query, the performance of such query is relatively bad? That is, if I don't use the function, performance of the SQL Select is ok? Thank you.
>
>In SQL Server there are 3 basic types of user defined functions:
>
>Scalar functions (that returns a scalar expression)
>Multi-line table functions (function consists of multiple statements and return a table)
>Inline table-level function (function, that has only one select statement returning a table).
>
>Unless the first two functions implemented as CLR functions, they usually don't scale too well, so the general wizdom is to avoid usage of such functions if there could be a different way to achieve the result.
>
>The inline table function behaves like a view and this one does not suffer from bad performance.
>
>To learn a bit more, check answers and references in responses to this SQL Server Quiz
>
>http://beyondrelational.com/quiz/sqlserver/general/2010/questions/25/sqlserver-quiz-general-2010-adam-haines-how-can-scalar-functions-cause-performance-problems-when-used-in-the-select-list-join-expression-or-where-clause.aspx

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform