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 2005 Forums
 SQL Server Administration (2005)
 query tuning

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2013-05-07 : 02:04:42
Hi All,

I have a query which joins nearly 21 tables altogether to fetch the required columns.While doing so the temp DB is immediately growing to more than 150 percent than the Db size. I tried to use DTA(database tuning ad visor) didn't suggested any indexes.

I need to run this query,how to troubleshoot.

Thanks,
Gangadhara MS
SQL Developer and DBA

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-07 : 03:52:40
do you really need to join these 21 tables? If yes, see if you can do required filtering of data from master tables and put them onto temporary tables before you do final join on them.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-05-07 : 13:38:10
is it data that changes regularly or is it static data? If so , consider different ways of grouping the data and denormalizing

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -