Solved

Impact of views on performance

Posted on 2009-03-31
4
219 Views
Last Modified: 2012-05-06
I have a design and performance question.  Considering a SQL Server 2008 database with 10 large tables (10 - 100 millions records).  These tables are dimensional with a number of small dimension tables.   Each table is largely denormalized for performance purposes.  

Here is the situation, we plan to add a column to hold an encrypted key to each table.  To make sure noone can access this key by any mean/ways they connect to the database.  One way is to create a view over each table to hide the key and perhaps a few more sensitive columns and only allow read-only users to access the views instead of the tables directly.

The question is: How much resource used by each view?  For instance, if a table is 20 GBs is size, would the view also occupy about 10 GBs in memory in general?
pax

 
0
Comment
Question by:cpeters5
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
udayakumarlm earned 200 total points
ID: 24027933
View will not store any data. when ever you query the view it will fetch the data from table.
0
 
LVL 60

Assisted Solution

by:chapmandew
chapmandew earned 300 total points
ID: 24027977
Right...views are just a "view of the data"...not the data itself (unless the view is indexed, but that is a different story).  You can certainly use a view for this purpose.  Another way is to disallow the viewing of that column's data through permissions.  Personally, I would use the views.
0
 

Author Comment

by:cpeters5
ID: 24028026
Thanks for the quick response.  I am not familiar with database theory that much coming from different background.  What I understand, a view is sort of a persistent query.  So while database is online, each view would occupy a chumk of memory.  Is this a correct understanding?  And if so, how big is that memory relative to the size of the query that defines the view?
0
 
LVL 60

Assisted Solution

by:chapmandew
chapmandew earned 300 total points
ID: 24028043
That is not a correct understanding.  A view is a stored query...but stored in a sense that it is ready to run...it is a definition of a way to pull data, not the actual data itself.  Does that make sense?  for example, this does NOT store any data.

create view viewname
as
select * from tablename

0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now