September 6, 2011 at 8:50 am
Hi,
I have this query:
(select rgc, nif_gerente, nome, morada from SGCTCentralReplica.dbo.V_SMPN_gerentes with (nolock)
where RGC in (select rgc from contribuintes)
AND RGC NOT IN (SELECT rgc from tabelargc ) )
It takes to long to run.
How can i optimaze it?
Thank you.
September 6, 2011 at 9:03 am
Please post the actual execution plan along with table DDL.
Assuming that's all there is to it I'm not seeing much hope for massive improvements.
Edit : And how long is way too long in your world, what's the target speed?
September 6, 2011 at 9:19 am
Please see this article
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
For how to help us to help you
September 6, 2011 at 12:02 pm
Is V_SMPN_gerentes a view? If so, please post the view defintion, too.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply