August 13, 2010 at 5:22 am
Hi All,
I am executing delete statement in production server and its taking more time . can any one please explain the reason
my delete statement looks like
: Delete from QuestionAnswerMapping WHERE Assessment Id=@Assessment
August 13, 2010 at 5:28 am
ningaraju.n (8/13/2010)
Hi All,I am executing delete statement in production server and its taking more time . can any one please explain the reason
my delete statement looks like
: Delete from QuestionAnswerMapping WHERE Assessment Id=@Assessment
Is there an index on [Assessment Id]?
How many rows in the table [QuestionAnswerMapping]?
You say your "delete statement looks like" - is this your delete statement or is there more to it? If so, please post the entire delete statement.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 13, 2010 at 5:35 am
Hi Chris,
There are 7K records and has index on column AssessmentId and this is an single statement
August 17, 2010 at 5:35 am
it should work faster if it doesnt contain any heavy columns ( BLOB type). use can take "BATCH approach"
or looping.
refer this http://www.sqlservercentral.com/articles/Top/63301/
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
August 17, 2010 at 5:47 am
ningaraju.n (8/13/2010)
Hi Chris,There are 7K records and has index on column AssessmentId and this is an single statement
Do you run the same statement many times with different @assessmentID?
How long does one DELETE statement take to run?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 18, 2010 at 7:17 am
1) trigger
2) blocking
3) unindex foreign keys
4) horrible tlog write performance
5) server being crushed by other activity
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply