Select * in a View
From: Gerald Stowers (gerald.stowers.no.spam_at_re-move-me.execupay.com)
Date: 09/07/04
- Next message: Wayne Snyder: "Re: anti-virus software"
- Previous message: Scarlett: "SQLMaint hangs SQLServr if can't extend file"
- Next in thread: Bryan: "Re: Select * in a View"
- Reply: Bryan: "Re: Select * in a View"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 7 Sep 2004 07:22:38 -0500
Hello,
I know using Select * in programming is a bad practice for performance,
but what about in a view? Is that a bad idea also?
We have an application that uses views for row-level security. Example,
I have a view of the invoice table to see only my invoices:
"create view users.invoices as select * from dbo.invoices where userid =
ME"
This makes updating the view easier since all I have to do is run
sp_refreshview to refresh the views, instead of changing the view code
each time table changes are made.
I understand that a definition of the columns the view accesses are
stored in a table to enable faster access plans, so does this make it ok
to use views with "Select *"
Thanks for any help!
- Next message: Wayne Snyder: "Re: anti-virus software"
- Previous message: Scarlett: "SQLMaint hangs SQLServr if can't extend file"
- Next in thread: Bryan: "Re: Select * in a View"
- Reply: Bryan: "Re: Select * in a View"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|