We are getting some terrible performance on one of our QDB's, a 60GB tempDB log & 30 minute open transactions.

We're traced it to this SPROC call:

exec dbo.iqamGetMemberServersForView 13903,N'NT_MachineFolder,UNIX_MachineFolder,VC_DIS COVEREDVMRESOURCE,AGENTLESS_SERVER_MACHINE,NT_VIR_ MachineFolder,NT_CLU_MachineFolder',0

looking at the execution plan the estimates are TERRIBLE!

e.g. estimated rows 48, actual rows 103,375 on the object table! EEeek! other tables are just as bad.

Has anyone got any ideas? We've rebuilt indexes & updated statistics on the tables & recompiled the SPROC