Dear all,
I have this stored procedure:
update newcampaign set apoklisi=
(SELECT 8-Avg(diffprev)
from v_periodresults where username=newcampaign.username
group by username)
This procedure is be execute in 28 seconds from a specific sql server.
The problem is that i have restored the db in to another Sql server and it's very slow about 30 minutes.
The v_periodresults is a view and i detect the problem there. i did a simple select in this view from both sql server the resultset came in 50 seconds for one and 20 for the other.
Any ideas for what's wrong with slow server.
Both are 2000 with sp4 also i executed the sp_updatestats
Best Regards!
I have this stored procedure:
update newcampaign set apoklisi=
(SELECT 8-Avg(diffprev)
from v_periodresults where username=newcampaign.username
group by username)
This procedure is be execute in 28 seconds from a specific sql server.
The problem is that i have restored the db in to another Sql server and it's very slow about 30 minutes.
The v_periodresults is a view and i detect the problem there. i did a simple select in this view from both sql server the resultset came in 50 seconds for one and 20 for the other.
Any ideas for what's wrong with slow server.
Both are 2000 with sp4 also i executed the sp_updatestats
Best Regards!