Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Development
»
Performce SP
Performce SP
Rate Topic
Display Mode
Topic Options
Author
Message
srimkumarp-720356
srimkumarp-720356
Posted Thursday, February 28, 2013 6:55 AM
Valued Member
Group: General Forum Members
Last Login: Friday, March 01, 2013 6:18 AM
Points: 57,
Visits: 464
Hi ,
One of SP is having below code and it is running more than 2 hrs. This job is daily schedule.
Table_B is truncate and load from souce systems on daily basis.
Number of rows in Table b is morethan 33000000.
On TableA 3 non-clustered indexes are already created.
UPDATE STATISTICS dbo.Table_A
UPDATE STATISTICS dbo.Table_B
Insert into Table_A
(columns...)
Select columns... from Table_B B1
LEFT JOIN Table_A A1 (NOLOCK)
ON B1.[Column1] = A1.[Column1]
AND A1.[SDate] IS NULL
WHERE A1.[Column1] IS NULL
udpate Table_a
.............
.............
I am not sure where I need to debug this issue. While running sp I ran the Profiler on database and ran the DB Tunning Advisor also. But I got only one recommandation on one column on Table A. This column is already tide with non-clustered index . Can any one please advice..
Thanks..
Post #1425031
Sean Lange
Sean Lange
Posted Thursday, February 28, 2013 7:37 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Today @ 3:32 PM
Points: 8,980,
Visits: 8,540
There is nowhere near enough information to provide anything other than a shot in the dark. Please read the following article about what to post for performance problems.
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
_______________________________________________________________
Need help? Help us help you.
Read the article at
http://www.sqlservercentral.com/articles/Best+Practices/61537/
for best practices on asking questions.
Need to split a string? Try Jeff Moden's
splitter
.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Post #1425043
pkuchaliya
pkuchaliya
Posted Tuesday, March 12, 2013 10:30 PM
Grasshopper
Group: General Forum Members
Last Login: Sunday, March 17, 2013 10:18 PM
Points: 21,
Visits: 133
can u please send me your complete SP.
Post #1430204
mmartin1
mmartin1
Posted Thursday, June 06, 2013 11:16 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 6:25 PM
Points: 198,
Visits: 657
Not enough information here, but I can guess that this query would benefit from a filter by date on table B. (At the least).
Post #1460823
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.