Solved

Impact of views on performance

Posted on 2009-03-31
4
224 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:
udaya kumar laligondla 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

832 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