|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Stored procedure Or Viewhi all
is stored procedure faster then view to retrieve data calculated by function Well i do not believe there would be a reall speed difference
however for calling from a program i would still recomend a stored procedure ( security etc etc ) regrds M. Posseth Show quote "Taha" <taha***@hotmail.com> wrote in message news:em$Uwnq8FHA.4008@TK2MSFTNGP10.phx.gbl... > hi all > is stored procedure faster then view to retrieve data calculated by > function > > > Taha (taha***@hotmail.com) writes:
> is stored procedure faster then view to retrieve data calculated by I'm not even sure the question is meaningful. If you have a function,> function you can call it directly, or embed it into something. Then it also depends on what sort of function it is. Is it a scalar function or table-valued? If table-valued, is it inline or multi-statement? -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx There is no magic answer. The VIEW will be portable and your can use
DCL for security. The VIEW will show the entire data set, while a stored procedure might producea smaller set of rows based on parameters. Generally speaking, I would go with the VIEW for the portability and not expect there to be much difference in performance, if the procedure returns the same data as the VIEW. |
|||||||||||||||||||||||