stored procedure or views?
-
Hi, I would like to ask if I have a query like this:
SELECT * FROM member
which one is better to use specially performance wise, stored procedure or views?
Technology News @ www.JassimRahma.com
-
Hi, I would like to ask if I have a query like this:
SELECT * FROM member
which one is better to use specially performance wise, stored procedure or views?
Technology News @ www.JassimRahma.com
Neither; it's fine the way it is. There may be other reasons to choose to write a view or a procedure, but performance generally isn't one of them.
-
Hi, I would like to ask if I have a query like this:
SELECT * FROM member
which one is better to use specially performance wise, stored procedure or views?
Technology News @ www.JassimRahma.com
If you're going to use
SELECT * FROM ...
rather than an explicit list of columns, you should be aware of this potential problem with views[^]: any changes to the underlying table will not be reflected in the view unless you explicitly refresh it. Since your application is likely to expect a specific list of columns, it's always better to selected them explicitly. TheSELECT * FROM ...
syntax should only be used for temporary ad-hoc queries when you're exploring the data.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
If you're going to use
SELECT * FROM ...
rather than an explicit list of columns, you should be aware of this potential problem with views[^]: any changes to the underlying table will not be reflected in the view unless you explicitly refresh it. Since your application is likely to expect a specific list of columns, it's always better to selected them explicitly. TheSELECT * FROM ...
syntax should only be used for temporary ad-hoc queries when you're exploring the data.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Hi, I would like to ask if I have a query like this:
SELECT * FROM member
which one is better to use specially performance wise, stored procedure or views?
Technology News @ www.JassimRahma.com
-
Hi, I would like to ask if I have a query like this:
SELECT * FROM member
which one is better to use specially performance wise, stored procedure or views?
Technology News @ www.JassimRahma.com
Based on the performance considerations, the SPs are more versatile and allow a broader range of inquiries and actions than the views.