문제

I have a very large table in SQL Server 2008. It has lots of fields which are only useful to a certain segment of users, some of the fields some users shouldn't be able to see.

The table is huge so I wanted to create some simple views for each user class where I could give them access to the view and they could only see the columns they need.

Does a view take up space in the database, or would it be saved as a simple select statement?

도움이 되었습니까?

해결책

Unless the view is indexed, it takes up almost no space, except for the definition of the view. The view itself is not like a table in that it physically stores rows in the database (unless it is an indexed view). It is only materialized (retrieves data) when it is called

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top