October 26, 2010 at 10:18 pm
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?
October 26, 2010 at 10:48 pm
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
October 26, 2010 at 10:50 pm
You are referring SQL 2005, so
please refer: http://msdn.microsoft.com/en-us/library/cc917715.aspx
Thanks
October 26, 2010 at 11:42 pm
Please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 28, 2010 at 1:08 am
Thanks for the Replies.
I have speed up the performance using Maintenance Plan with Rebuild and Reorganize.
October 29, 2010 at 10:44 am
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 on googles mail service
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply