Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

To Fetch Records from a table quickly which is having 10 Lakhs record Expand / Collapse
Author
Message
Posted Tuesday, October 26, 2010 10:18 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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?
Post #1011252
Posted Tuesday, October 26, 2010 10:48 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 4:43 AM
Points: 1,130, Visits: 1,391
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
Post #1011257
Posted Tuesday, October 26, 2010 10:50 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 4:43 AM
Points: 1,130, Visits: 1,391
You are referring SQL 2005, so
please refer: http://msdn.microsoft.com/en-us/library/cc917715.aspx


Thanks
Post #1011258
Posted Tuesday, October 26, 2010 11:42 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 8:19 AM
Points: 40,208, Visits: 36,617
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 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1011279
Posted Thursday, October 28, 2010 1:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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.
Post #1012104
Posted Friday, October 29, 2010 10:44 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:18 PM
Points: 4,406, Visits: 6,268
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
Post #1013221
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse