Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tune up the update statement
Message
From
24/09/2002 08:41:42
 
 
To
23/09/2002 19:20:18
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00703585
Message ID:
00703719
Views:
19
Could you post a query plan. A textual one would be fine.

Have you tried running the query through the Index Tuning Wizard?

-Mike

>this update statement takes 10 to 20 seconds to run. anyway to tune up the statement?
>
>update ea
>set ea.Next_Activity_Date_New = rn.date_
>from employee_accounts ea
>inner join (select min(appt_date) as date_,company from rn_appointments
>where appt_date > convert(varchar(20), getdate(),1) and (activity_complete is null or activity_complete = 0)
>group by company) as rn
>on rn.company = ea.company_id
>where (ea.delete_flag is null or ea.delete_flag = 0) and ea.employee_id = @employee_id
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform