|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, October 29, 2010 3:34 AM
Points: 2,
Visits: 6
|
|
| I having a view which returns nearly 80 thousand records in 1 min which is very slower. View has join with two big table which has master table -3 Lakhs records, detail table - 10 Lakhs records. Every table has composite primary key. View needs to be faster any suggestions for me pls?
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:11 AM
Points: 877,
Visits: 1,159
|
|
You can create Indexed view - add Index on the view.
As per BOL: "An indexed view is a view that has been materialized. This means it has been computed and stored. You index a view by creating a unique clustered index on it. Indexed views dramatically improve the performance of some types of queries. Indexed views work best for queries that aggregate many rows."
Refer: http://msdn.microsoft.com/en-us/library/ms191432.aspx
Thanks
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:11 AM
Points: 877,
Visits: 1,159
|
|
You are referring SQL 2005, so please refer: http://msdn.microsoft.com/en-us/library/cc917715.aspx
Thanks
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 4:11 PM
Points: 37,741,
Visits: 30,020
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, October 29, 2010 3:34 AM
Points: 2,
Visits: 6
|
|
Thanks for the Replies.
I have speed up the performance using Maintenance Plan with Rebuild and Reorganize.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Yesterday @ 12:01 PM
Points: 3,582,
Visits: 5,130
|
|
mkarthi1982 (10/28/2010) Thanks for the Replies.
I have speed up the performance using Maintenance Plan with Rebuild and Reorganize.
If you are doing rebuild and reorg on the same tables, PLEASE have a consultant help you out! Hmm, actually have one help you anyway because you shouldn't be using Maintenance Plans for index maintenance!
Best,
Kevin G. Boles SQL Server Consultant SQL MVP 2007-2012 TheSQLGuru at GMail
|
|
|
|