March 29, 2011 at 1:32 pm
I have a lock on a table by running stored procedure. I ran an exution plan
it showing 61% on clustered index updated
How do I know which is a problem and how to fix it?
Thank you
March 29, 2011 at 1:42 pm
Please post the execution plan.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 29, 2011 at 1:57 pm
CirquedeSQLeil (3/29/2011)
Please post the execution plan.
How
March 29, 2011 at 2:03 pm
Read the first article in my signature (By Gail Shaw).
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 30, 2011 at 6:05 am
Or watch this video on how to do it.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 30, 2011 at 6:09 am
Query and table and index definitions as well please
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2011 at 6:30 am
Guys, I loaded
Thank you so much
March 30, 2011 at 6:39 am
Krasavita (3/30/2011)
Guys, I loadedThank you so much
I don't think that uploaded correctly. It's only 399 bytes.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 30, 2011 at 7:01 am
It uploaded correctly, but it's a plan for nothing.
<?xml version="1.0" encoding="utf-16"?>
<ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0" Build="9.00.4053.00" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple />
</Statements>
</Batch>
</BatchSequence>
</ShowPlanXML>
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2011 at 7:05 am
Sorry, is it better now?
March 30, 2011 at 7:38 am
Can some please help me this is production server.
Thank you
March 30, 2011 at 7:43 am
If it's critically urgent, hire a consultant. Please remember that we're all unpaid volunteers here, we all have our own jobs, our own problems.
Also, you haven't posted the query, table and index definitions as asked.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2011 at 7:53 am
Your UPDATE statement doesn't make sense to me. You are updating a table, NED_Employee, based on data from two other tables, but you have not specified how NED_Employee relates (joins) to those tables.
If you are using SQL Server 2008, you should look at the MERGE statement instead.
UPDATE dbo.NED_Employee
SET
Department_ID=d.Department_ID
FROM [DB1].MIT.dbo.National_Employees ne, dbo.ADP_Department d
WHERE ne.Office_Location=d.Office_Id
AND d.Effective_Status='A'
AND ne.Address_Book_ID=@NED_Emp_ID
March 30, 2011 at 8:14 am
You have a lot going on under the covers here. Remote queries are likely to cause issues when you're trying to join data. This query:
UPDATE dbo.NED_Employee
SET
Department_ID=d.Department_ID
FROM [DB1].MIT.dbo.National_Employees ne, dbo.ADP_Department d
WHERE ne.Office_Location=d.Office_Id
AND d.Effective_Status='A'
AND ne.Address_Book_ID=@NED_Emp_ID
Doesn't have a mechanism for joining all the data together. How do the two tables relate to NED_Employee? You have to define that relationship. That's why you're getting the missing predicate alert. Also, I'd start learning standard ANSI join syntax, ...FROM TableX JOIN TableY ON...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 30, 2011 at 8:19 am
I am using SQL server 2005
Viewing 15 posts - 1 through 15 (of 39 total)
You must be logged in to reply to this topic. Login to reply