Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Is using a view good for performance

Author  Topic 

Nader
Starting Member

41 Posts

Posted - 2012-05-22 : 12:39:22
Hi all,
I have several huge tables but a lot of queries pull the same information from those linked tables is it better to create a view pulling this information then using it.
example:
user: userid, firstname,lastname
enrollement:sectionid,studentid,enrollmentstatus
userassocation:userid,orguserid,orguserfn,orguserln
those are huge tables
I need the list of students and their information enrolled in a particular section in several stored procedures for student roster, gradebook etc
Is it advisable to create a view pulling this information then using that view or this will not be good for performance.

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2012-05-22 : 13:42:26
Views are not necessarily a performance booster, as much as they are a convenience that you can use in lieu of writing the same large query to retrieve specific data joined a certain way each time.


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2012-05-22 : 14:17:43
your view is as good as the quality of indexing you use on your tables

<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page
   

- Advertisement -