| Author |
Views vs Stored Procedures?
|
|
|
| Anybody knows the pros and cons of using Views vs Stored Procedures?
| |
| Hari Prasad 2005-05-16, 8:23 pm |
| Hi,
Both are different objects and the purpose is more or less different. I
will say both the objects will have only advantages no disadvantages.
Only advantage in stored procedure over a view is that we can implement too
many conplicated logics inside the procedure.
Thanks
Hari
SQL Server MVP
"Jerry" <Jerry@discussions.microsoft.com> wrote in message
news:050FDF40-E2B6-449D-AB8B- 52BFBBBBF3DF@microso
ft.com...
> Anybody knows the pros and cons of using Views vs Stored Procedures?
| |
|
| In term of perfomance?
"Hari Prasad" wrote:
> Hi,
>
> Both are different objects and the purpose is more or less different. I
> will say both the objects will have only advantages no disadvantages.
> Only advantage in stored procedure over a view is that we can implement too
> many conplicated logics inside the procedure.
>
> Thanks
> Hari
> SQL Server MVP
>
>
>
> "Jerry" <Jerry@discussions.microsoft.com> wrote in message
> news:050FDF40-E2B6-449D-AB8B- 52BFBBBBF3DF@microso
ft.com...
>
>
>
| |
| David Gugick 2005-05-16, 8:23 pm |
| Jerry wrote:
> Anybody knows the pros and cons of using Views vs Stored Procedures?
These two items are not mutually exclusive and there's no reason to
discuss the benefits of one over the other. As Hari said, they are very
different. You should alwasy use stored procedure for access to the
database for security and performance reasons. You can use views in the
database (from the procedures) if your database would benefit from their
use. You can use views to provide an easier interface for developers to
the underlying data and use them for security in order to restrict
access to certain data. But there's no real decision to be made in using
one of the other.
--
David Gugick
Imceda Software
www.imceda.com
| |
| Michael C# 2005-05-16, 8:23 pm |
| If you could say what you're trying to accomplish specifically, you'll
probably get a better answer as to how one or the other could suit your
purpose; and which one might be better used in your specific situation...
"Jerry" <Jerry@discussions.microsoft.com> wrote in message
news:050FDF40-E2B6-449D-AB8B- 52BFBBBBF3DF@microso
ft.com...
> Anybody knows the pros and cons of using Views vs Stored Procedures?
| |
|
| i meant in terms of Perfomance...
CREATE VIEW AS SELECT A,B,C FROM TABLE
or
CREATE PROCEDURE
SELECT A,B,C FROM TABLE
"Michael C#" wrote:
> If you could say what you're trying to accomplish specifically, you'll
> probably get a better answer as to how one or the other could suit your
> purpose; and which one might be better used in your specific situation...
>
> "Jerry" <Jerry@discussions.microsoft.com> wrote in message
> news:050FDF40-E2B6-449D-AB8B- 52BFBBBBF3DF@microso
ft.com...
>
>
>
| |
| Kalen Delaney 2005-05-17, 3:23 am |
| Jerry
You have two completely different threads going on in two separate
newsgroups with different people responding to each. Please do not multipost
like this, so there is just one thread for everyone (including you) to
follow. It really saves people a lot of aggravation. Thanks
--
HTH
----------------
Kalen Delaney
SQL Server MVP
www. SolidQualityLearning
.com
"Jerry" <Jerry@discussions.microsoft.com> wrote in message
news:32781B00-3F12-45AA-9F17- 2A2CE9A2023B@microso
ft.com...[color=darkred]
>i meant in terms of Perfomance...
>
> CREATE VIEW AS SELECT A,B,C FROM TABLE
>
> or
>
> CREATE PROCEDURE
> SELECT A,B,C FROM TABLE
>
>
>
> "Michael C#" wrote:
>
|
|
|
|